text:
<!DOCTYPE html>

            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1">
            <title>Pokémon GO - Live Map</title>
            <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">

Loading, please wait...

                                        Update available, click here to install

                                    <button onclick="logout()"
                                        class="btn btn-xl btn-primary">Logout</button>

                                    Waiting
                                    Outage
                                    Possible Ban
                                    Operational

                                    <button data-toggle="modal" data-target="#mobile"
                                        class="btn btn-xl btn-info">Mobile</button>

                <webview id="mapview" autosize="on"
                    src="about:blank"
                    style="display:inline-flex; height: 100%; width: 100%;"></webview>

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

Mobile Access

Not Enabled

Enabled

                        URL:

                    To toggle sharing, click the button below.

                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-warning" id="mobileToggle" onclick="toggleMobile()">Toggle Sharing</button>


text:
This is the go Falcore portion of a [benchmarking test suite](../) comparing a variety of web development platforms.
Falcore is an HTTP server written in Go that provides an alternate API and additional features compared to the Go standard
library HTTP server.

### Source
* [All test source](src/framework_benchmarks/falcore.go)

## Versions

* [Go 1.1.1](http://golang.org/)

## Test URLs

    http://localhost:8080/json
    http://localhost:8080/db
    http://localhost:8080/fortune
    http://localhost:8080/queries
    http://localhost:8080/update
    http://localhost:8080/plaintext

redpajama_set_name: RedPajamaGithub


text:
package net.derohimat.samplebasemvp.view.activity.main;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;

import net.derohimat.samplebasemvp.R;
import net.derohimat.samplebasemvp.data.remote.model.weather.WeatherPojo;
import net.derohimat.samplebasemvp.events.MessagesEvent;
import net.derohimat.samplebasemvp.util.DialogFactory;
import net.derohimat.samplebasemvp.util.UnitLocale;
import net.derohimat.samplebasemvp.view.MvpActivity;
import net.derohimat.samplebasemvp.view.activity.settings.SettingsActivity;
import net.derohimat.samplebasemvp.view.fragment.detail.DetailFragment;

import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;

import javax.inject.Inject;

import butterknife.BindView;
import butterknife.OnClick;
import timber.log.Timber;

public class MainActivity extends MvpActivity implements MainView {

    private static ProgressBar mProgressBar = null;
    @BindView(R.id.textview_main_city)
    TextView textview_main_city;
    @BindView(R.id.textView_main_conditions)
    TextView textView_main_conditions;
    @BindView(R.id.textView_main_current_temperature)
    TextView textView_main_current_temperature;
    @BindView(R.id.textView_main_min_max)
    TextView textView_main_min_max;
    @BindView(R.id.textView_main_pressure)
    TextView textView_main_pressure;
    @BindView(R.id.textView_main_humidity)
    TextView textView_main_humidity;
    @BindView(R.id.textView_main_wind)
    TextView textView_main_wind;
    @BindView(R.id.imageView_main_icon)
    ImageView imageView_main_icon;
    @BindView(R.id.button_main_next_days)
    Button button_main_next_days;
    @Inject
    EventBus eventBus;
    private MainPresenter mMainPresenter;

    //http://openweathermap.org/weather-conditions
    public static int getIcon(int weatherId) {
        if (weatherId >= 200 && weatherId <= 232) {
            return R.drawable.ic_thunderstorm;
        } else if (weatherId >= 300 && weatherId <= 321) {
            return R.drawable.ic_rain;
        } else if (weatherId >= 500 && weatherId <= 504) {
            return R.drawable.ic_rain;
        } else if (weatherId == 511) {
            return R.drawable.ic_snow;
        } else if (weatherId >= 520 && weatherId <= 531) {
            return R.drawable.ic_rain;
        } else if (weatherId >= 600 && weatherId <= 622) {
            return R.drawable.ic_snow;
        } else if (weatherId >= 701 && weatherId <= 761) {
            return R.drawable.ic_fog;
        } else if (weatherId == 761 || weatherId == 781) {
            return R.drawable.ic_thunderstorm;
        } else if (weatherId == 800) {
            return R.drawable.ic_clear;
        } else if (weatherId == 801) {
            return R.drawable.ic_light_clouds;
        } else if (weatherId >= 802 && weatherId <= 804) {
            return R.drawable.ic_cloudy;
        }
        return -1;
    }

    @Override
    protected int getResourceLayout() {
        return R.layout.main_activity;
    }

    @Override
    protected void onViewReady(Bundle savedInstanceState) {
        mMainPresenter = new MainPresenter(this);
        mMainPresenter.attachView(this);

        getBaseActionBar().setElevation(0);

        getBaseFragmentManager().addOnBackStackChangedListener(() -> {
            if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
                getBaseActionBar().setDisplayHomeAsUpEnabled(true);
            } else {
                getBaseActionBar().setTitle(getString(R.string.app_name));
                getBaseActionBar().setDisplayHomeAsUpEnabled(false);
            }
        });

        mMainPresenter.loadWeather("Bandung");
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getComponent().inject(this);
    }

    @OnClick(R.id.button_main_next_days)
    void onClick_button_main_next_days() {
        getBaseActionBar().setTitle("Next days");
        getBaseFragmentManager().beginTransaction().replace(R.id.container_rellayout, DetailFragment.newInstance(1)).addToBackStack(null).commit();
    }

    @Override
    protected void onDestroy() {
        mMainPresenter.detachView();
        super.onDestroy();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle item selection
        switch (item.getItemId()) {
            case R.id.action_settings:
                startActivity(new Intent(this, SettingsActivity.class));
                return true;
            case R.id.action_exit:
                finish();
                return true;
            case R.id.action_refresh:
                if (getBaseFragmentManager().getBackStackEntryCount() > 0) {
                    //--- we are in the details fragment.

                } else {
                    //--- we are here
                    mMainPresenter.loadWeather("Bandung");
                }

                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }

    @Override
    public void onStart() {
        super.onStart();
        eventBus.register(this);
    }

    @Override
    public void onStop() {
        eventBus.unregister(this);
        super.onStop();
    }

    @Subscribe
    public void onEvent(MessagesEvent event) {
        if (event.ismSuccess()) {
            DialogFactory.createSimpleOkDialog(mContext, getString(R.string.app_name), event.getMessage()).show();
        } else {
            DialogFactory.showErrorSnackBar(mContext, findViewById(android.R.id.content), new Throwable(event.getMessage())).show();
        }
    }

    @Override
    public void showWeather(WeatherPojo weatherPojo) {

        Timber.d("show Weather %s", weatherPojo.toString());

        textview_main_city.setText(weatherPojo.getName());
        textView_main_current_temperature.setText(String.format("%.1f°", weatherPojo.getMain().getTemp()));
        textView_main_min_max.setText(String.format("%.1f°  %.1f°", weatherPojo.getMain().getTempMin(), weatherPojo.getMain().getTempMax()));
        textView_main_conditions.setText(weatherPojo.getWeather().get(0).getDescription());
        textView_main_humidity.setText(getString(R.string.humidity) + " " + weatherPojo.getMain().getHumidity() + "%");

        String wind_suffix = getResources().getString(R.string.wind_suffix_metric);
        if (UnitLocale.getDefault().equals(UnitLocale.Imperial))
            wind_suffix = getResources().getString(R.string.wind_suffix_imperial);
        textView_main_wind.setText(getString(R.string.wind) + " " + String.valueOf(weatherPojo.getWind().getSpeed()) + wind_suffix);

        textView_main_pressure.setText(getString(R.string.pressure) + " " + weatherPojo.getMain().getPressure() + "hPa");
        imageView_main_icon.setImageDrawable(ContextCompat.getDrawable(getContext(), getIcon(weatherPojo.getWeather().get(0).getId())));
    }

    @Override
    public void showProgress() {
        if (mProgressBar == null) {
            mProgressBar = DialogFactory.DProgressBar(mContext);
        } else {
            mProgressBar.setVisibility(View.VISIBLE);
        }
    }

    @Override
    public void hideProgress() {
        mProgressBar.setVisibility(View.GONE);
    }

    @Override
    public Context getContext() {
        return this;
    }
}


text:
package org.apache.lucene.search;

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

import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.analysis.MockTokenizer;
import org.apache.lucene.codecs.Codec;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.index.FilteredTermsEnum;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.RandomIndexWriter;
import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.CharsRef;
import org.apache.lucene.util.CharsRefBuilder;
import org.apache.lucene.util.LuceneTestCase;
import org.apache.lucene.util.TestUtil;
import org.apache.lucene.util.UnicodeUtil;
import org.apache.lucene.util.automaton.AutomatonTestUtil;
import org.apache.lucene.util.automaton.CharacterRunAutomaton;
import org.apache.lucene.util.automaton.Automaton;
import org.apache.lucene.util.automaton.RegExp;

/**
 * Create an index with random unicode terms
 * Generates random regexps, and validates against a simple impl.
 */
public class TestRegexpRandom2 extends LuceneTestCase {
  protected IndexSearcher searcher1;
  protected IndexSearcher searcher2;
  private IndexReader reader;
  private Directory dir;
  protected String fieldName;

  @Override
  public void setUp() throws Exception {
    super.setUp();
    dir = newDirectory();
    fieldName = random().nextBoolean() ? "field" : ""; // sometimes use an empty string as field name
    RandomIndexWriter writer = new RandomIndexWriter(random(), dir,
        newIndexWriterConfig(new MockAnalyzer(random(), MockTokenizer.KEYWORD, false))
        .setMaxBufferedDocs(TestUtil.nextInt(random(), 50, 1000)));
    Document doc = new Document();
    Field field = newStringField(fieldName, "", Field.Store.NO);
    doc.add(field);
    List<String> terms = new ArrayList<>();
    int num = atLeast(200);
    for (int i = 0; i < num; i++) {
      String s = TestUtil.randomUnicodeString(random());
      field.setStringValue(s);
      terms.add(s);
      writer.addDocument(doc);
    }

    if (VERBOSE) {
      // utf16 order
      Collections.sort(terms);
      System.out.println("UTF16 order:");
      for(String s : terms) {
        System.out.println("  " + UnicodeUtil.toHexString(s));
      }
    }

    reader = writer.getReader();
    searcher1 = newSearcher(reader);
    searcher2 = newSearcher(reader);
    writer.close();
  }

  @Override
  public void tearDown() throws Exception {
    reader.close();
    dir.close();
    super.tearDown();
  }

  /** a stupid regexp query that just blasts thru the terms */
  private class DumbRegexpQuery extends MultiTermQuery {
    private final Automaton automaton;

    DumbRegexpQuery(Term term, int flags) {
      super(term.field());
      RegExp re = new RegExp(term.text(), flags);
      automaton = re.toAutomaton();
    }

    @Override
    protected TermsEnum getTermsEnum(Terms terms, AttributeSource atts) throws IOException {
      return new SimpleAutomatonTermsEnum(terms.iterator(null));
    }

    private class SimpleAutomatonTermsEnum extends FilteredTermsEnum {
      CharacterRunAutomaton runAutomaton = new CharacterRunAutomaton(automaton);
      CharsRefBuilder utf16 = new CharsRefBuilder();

      private SimpleAutomatonTermsEnum(TermsEnum tenum) {
        super(tenum);
        setInitialSeekTerm(new BytesRef(""));
      }

      @Override
      protected AcceptStatus accept(BytesRef term) throws IOException {
        utf16.copyUTF8Bytes(term.bytes, term.offset, term.length);
        return runAutomaton.run(utf16.chars(), 0, utf16.length()) ?
            AcceptStatus.YES : AcceptStatus.NO;
      }
    }

    @Override
    public String toString(String field) {
      return field.toString() + automaton.toString();
    }
  }

  /** test a bunch of random regular expressions */
  public void testRegexps() throws Exception {
    // we generate aweful regexps: good for testing.
    // but for preflex codec, the test can be very slow, so use less iterations.
    int num = Codec.getDefault().getName().equals("Lucene3x") ? 100 * RANDOM_MULTIPLIER : atLeast(1000);
    for (int i = 0; i < num; i++) {
      String reg = AutomatonTestUtil.randomRegexp(random());
      if (VERBOSE) {
        System.out.println("TEST: regexp=" + reg);
      }
      assertSame(reg);
    }
  }

  /** check that the # of hits is the same as from a very
   * simple regexpquery implementation.
   */
  protected void assertSame(String regexp) throws IOException {
    RegexpQuery smart = new RegexpQuery(new Term(fieldName, regexp), RegExp.NONE);
    DumbRegexpQuery dumb = new DumbRegexpQuery(new Term(fieldName, regexp), RegExp.NONE);

    TopDocs smartDocs = searcher1.search(smart, 25);
    TopDocs dumbDocs = searcher2.search(dumb, 25);

    CheckHits.checkEqual(smart, smartDocs.scoreDocs, dumbDocs.scoreDocs);
  }
}


text:
package packages

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"regexp"
	"runtime"
	"strings"

	"gopkg.in/yaml.v2"
)

// PackageManager manages packages at a given path
type PackageManager struct {
	InstallPath string
}

// NewPackageManager creates a new PackageManager
func NewPackageManager(path string) *PackageManager {
	return &PackageManager{InstallPath: path}
}

// Install installs a package
func (pm *PackageManager) Install(pkg *Package) error {
	d, err := yaml.Marshal(&pkg)
	if err != nil {
		return err
	}

	packagePath := pm.MakePackagePath(pkg.Name)

	if _, err := os.Stat(packagePath); err == nil {
		return fmt.Errorf("'%s' already exists", packagePath)
	}

	if runtime.GOOS == "windows" {
		d = append([]byte(":: |\r\n  @echo off\r\n  whalebrew run %~f0 %*\r\n  exit /b %errorlevel%\r\n"), d...)
		d = bytes.Replace(d, []byte("\r\n"), []byte("\n"), -1)
		d = bytes.Replace(d, []byte("\n"), []byte("\r\n"), -1)
	} else {
		d = append([]byte("#!/usr/bin/env whalebrew\n"), d...)
	}
	return ioutil.WriteFile(packagePath, d, 0755)
}

// ForceInstall installs a package
func (pm *PackageManager) ForceInstall(pkg *Package) error {
	d, err := yaml.Marshal(&pkg)
	if err != nil {
		return err
	}

	packagePath := pm.MakePackagePath(pkg.Name)

	if runtime.GOOS == "windows" {
		d = append([]byte(":: |\r\n  @echo off\r\n  whalebrew run %~f0 %*\r\n  exit /b %errorlevel%\r\n"), d...)
		d = bytes.Replace(d, []byte("\r\n"), []byte("\n"), -1)
		d = bytes.Replace(d, []byte("\n"), []byte("\r\n"), -1)
	} else {
		d = append([]byte("#!/usr/bin/env whalebrew\n"), d...)
	}
	return ioutil.WriteFile(packagePath, d, 0755)
}

// List lists installed packages
func (pm *PackageManager) List() (map[string]*Package, error) {
	packages := make(map[string]*Package)
	files, err := ioutil.ReadDir(pm.InstallPath)
	if err != nil {
		return packages, err
	}
	for _, file := range files {
		isPackage, err := IsPackage(filepath.Join(pm.InstallPath, file.Name()))
		if err != nil {
			// Check for various file errors here rather than in IsPackage so it
			// does not swallow errors when checking individual files.

			// permission denied
			if os.IsPermission(err) {
				continue
			}
			// dead symlink
			if os.IsNotExist(err) {
				continue
			}

			return packages, err
		}
		if isPackage {
			pkgName := file.Name()
			if runtime.GOOS == "windows" {
				re := regexp.MustCompile("\\.bat$")
				pkgName = re.ReplaceAllLiteralString(pkgName, "")
			}

			pkg, err := pm.Load(pkgName)
			if err != nil {
				return packages, err
			}
			packages[pkgName] = pkg
		}
	}
	return packages, nil
}

// Load returns an installed package given its package name
func (pm *PackageManager) Load(name string) (*Package, error) {
	return LoadPackageFromPath(pm.MakePackagePath(name))
}

// Uninstall uninstalls a package
func (pm *PackageManager) Uninstall(packageName string) error {
	p := pm.MakePackagePath(packageName)
	isPackage, err := IsPackage(p)
	if err != nil {
		return err
	}
	if !isPackage {
		return fmt.Errorf("%s is not a Whalebrew package", p)
	}
	return os.Remove(p)
}

// IsPackage returns true if the given path is a whalebrew package
func IsPackage(path string) (bool, error) {
	if runtime.GOOS == "windows" && !strings.HasSuffix(path, ".bat") {
		return false, nil
	}

	f, err := os.Open(path)
	if err != nil {
		return false, err
	}
	defer f.Close()

	info, err := f.Stat()

	if err != nil {
		return false, err
	}

	if info.IsDir() {
		return false, nil
	}

	reader := bufio.NewReader(f)

	if runtime.GOOS == "windows" {
		line, _, err := reader.ReadLine()

		if err == io.EOF {
			return false, nil
		}
		if err != nil {
			return false, err
		}
		if strings.HasPrefix(string(line), ":: |") {
			return true, nil
		}
		return false, nil
	}

	firstTwoBytes := make([]byte, 2)
	_, err = reader.Read(firstTwoBytes)

	if err == io.EOF {
		return false, nil
	}

	if err != nil {
		return false, err
	}

	if string(firstTwoBytes) != "#!" {
		return false, nil
	}

	line, _, err := reader.ReadLine()

	if err == io.EOF {
		return false, nil
	}
	if err != nil {
		return false, err
	}
	if strings.HasPrefix(string(line), "/usr/bin/env whalebrew") {
		return true, nil
	}

	return false, nil
}

// MakePackagePath returns package path
func MakePackagePath(dir, name string) string {
	// if on Windows, file is batch file.
	pkgPath := filepath.Join(dir, name)
	if runtime.GOOS == "windows" {
		pkgPath = pkgPath + ".bat"
	}
	return pkgPath
}

// MakePackagePath returns package path
func (pm *PackageManager) MakePackagePath(name string) string {
	return MakePackagePath(pm.InstallPath, name)
}


text:
package ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP;

import java.io.IOException;
import java.util.BitSet;
import java.util.Map;

import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.items.Item;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.items.PseudoSequence;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.items.PseudoSequenceDatabase;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.items.Sequence;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.items.SequenceDatabase;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.items.creators.AbstractionCreator;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.savers.Saver;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.savers.SaverIntoFile;
import ca.pfv.spmf.algorithms.sequentialpatterns.prefixSpan_AGP.savers.SaverIntoMemory;
import ca.pfv.spmf.tools.MemoryLogger;

/**
 * This is an implementation of the PrefixSpan algorithm by Antonio Gomariz Peñalver(AGP).
 * PrefixSpan was proposed by Pei et al. 2001. This algorithm was inspired in the
 * implementation of SPMF and, from it, I changed and optimized some things.
 *

 *
 * NOTE: This implementation saves the pattern  to a file as soon
 * as they are found or can keep the pattern into memory if no output path is provided by the user.
 *
 * @author Antonio Gomariz Peñalver
 */
public class AlgoPrefixSpan_AGP {

    /**
     * the minimum support threshold as a value in [0,1]
     */
    protected double minSupRelative;
    /**
     * The minimum support relative threshold, i.e. the minimum number of sequences
     * where the patterns have to be
     */
    protected double minSupAbsolute;
    /**
     * original sequential database to be used for sequential patterns
     * extraction
     */
    protected SequenceDatabase originalDataset;
    /**
     * Saver variable to decide where the user want to save the results, if it the case
     */
    Saver saver = null;
    /**
     * Start and end points in order to calculate the overall time taken by the algorithm
     */
    protected long start, end;
    /**
     * The abstraction creator
     */
    private AbstractionCreator abstractionCreator;
    /**
     * Number of frequent patterns found by the algorithm
     */
    private int numberOfFrequentPatterns = 0;

    /**
     * Standard constructor. It takes the minimum support threshold (from 1 up to 0) and an abstraction creator
     * @param minsupRelative the relative minimum  support threshold
     * @param creator the abstraction creator
     */
    public AlgoPrefixSpan_AGP(double minsupRelative, AbstractionCreator creator) {
        this.minSupRelative = minsupRelative;
        this.abstractionCreator = creator;
    }

    /**
     * Method that starts the execution of the algorithm.
     * @param database The original database in which we apply PrefixSpan
     * @param keepPatterns Flag indicating if the user want to keep the frequent
     * patterns or he just want the amount of them
     * @param verbose Flag for debugging purposes
     * @param outputFilePath Path pointing out to the file where the output,
     * composed of frequent patterns, has to be kept. If, conversely, this
     * parameter is null, we understand that the user wants the output in the main memory
     * @throws IOException
     */
    public void runAlgorithm(SequenceDatabase database, boolean keepPatterns, boolean verbose, String outputFilePath) throws IOException {
        //calculation of the absolute minimum support

        minSupAbsolute = (int) Math.ceil(minSupRelative * database.size());
        if (this.minSupAbsolute == 0) { // protection
            this.minSupAbsolute = 1;
        }
        // reset the stats about memory usage
	MemoryLogger.getInstance().reset();
        //keeping the starting time
        start = System.currentTimeMillis();
        //Starting PrefixSpanAlgorithm
        prefixSpan(database, keepPatterns, verbose, outputFilePath);
        //keeping the ending time
        end = System.currentTimeMillis();
        //Search for frequent patterns: Finished
        saver.finish();
    }

    /**
     * Method that executes the first steps before calling the actual main
     * method of PrefixSpan. In particular, the original database is fully
     * converted to a pseudosequece database, removing the infrequent items
     * that appeared in the original dabase
     * @param database The original database
     * @param keepPatterns Flag indicating if the user want to keep the frequent
     * patterns or he just want the amount of them
     * @param verbose Flag for debugging purposes
     * @param outputFilePath Path pointing out to the file where the output,
     * composed of frequent patterns, has to be kept. If, conversely, this
     * parameter is null, we understand that the user wants the output in the main memory
     * @throws IOException
     */
    protected void prefixSpan(SequenceDatabase database, boolean keepPatterns, boolean verbose, String outputFilePath) throws IOException {
        //If we do no have any file path
        if (outputFilePath == null) {
            //The user wants to save the results in memory
            saver = new SaverIntoMemory();
        } else {
            //Otherwise, the user wants to save them in the given file
            saver = new SaverIntoFile(outputFilePath);
        }
        /*We get the map which relates the frequent items with their appearances
        in the database*/
        Map<Item, BitSet> mapSequenceID = database.getFrequentItems();
        /*projection of the original database in order to obtain a pseudosequence
         * database*/
        PseudoSequenceDatabase pseudoDatabase = projectInitialDatabase(database, mapSequenceID, (int) minSupAbsolute);
        //We initialize the class that is in charge of managing the main loop of PrefixSpan
        RecursionPrefixSpan_AGP algorithm = new RecursionPrefixSpan_AGP(abstractionCreator, saver, (int) minSupAbsolute, pseudoDatabase, mapSequenceID);
        //And we execute the actual algorithm
        algorithm.execute(keepPatterns, verbose);
        //Finally we update the number of frequent patterns that we found
        numberOfFrequentPatterns = algorithm.numberOfFrequentPatterns();
        // check the memory usage for statistics
	MemoryLogger.getInstance().checkMemory();
    }

    /**
     * Method to get the outlined information about the search for frequent
     * sequences by means of PrefixSpan algorithm as a string.
     * @return a string
     */
    public String printStatistics() {
        StringBuilder sb = new StringBuilder(200);
        sb.append("=============  Algorithm - STATISTICS =============\n Total time ~ ");
        sb.append(getRunningTime());
        sb.append(" ms\n");
        sb.append(" Frequent sequences count : ");
        sb.append(numberOfFrequentPatterns);
        sb.append('\n');
        sb.append(" Max memory (mb):");
	sb.append(MemoryLogger.getInstance().getMaxMemory());
        sb.append('\n');
        sb.append(saver.print());
        sb.append('\n');
        sb.append("===================================================\n");
        return sb.toString();
    }

    /**
     * Get the number of frequent patterns found.
     * @return the number of frequent patterns.
     */
    public int getNumberOfFrequentPatterns() {
        return numberOfFrequentPatterns;
    }

    /**
     * It gets the time spent by the algoritm in its execution.
     * @return the time spent (long).
     */
    public long getRunningTime() {
        return (end - start);
    }

    /**
     * It gets the absolute minimum support, i.e. the minimum number of database
     * sequences where a pattern has to appear
     * @return the minimum support (double)
     */
    public double getAbsoluteMinSupport() {
        return minSupAbsolute;
    }

    /**
     * It projects the initial database converting each original sequence to
     * pseudosequences in order to enable the later pseudoprojections in the
     * main loop of PrefixSpan
     * @param database The original Database
     * @param mapSequenceID Map with all the items appearing in the original
     * database, and a bitset pointing out in which sequences the items appear
     * @param minSupportAbsolute The absolute minimum support
     * @return
     */
    private PseudoSequenceDatabase projectInitialDatabase(SequenceDatabase database, Map<Item, BitSet> mapSequenceID, long minSupportAbsolute) {
        PseudoSequenceDatabase initialContext = new PseudoSequenceDatabase();
        //For each database sequence
        for (Sequence sequence : database.getSequences()) {
            //The new pseudosequences are optimized, since do not have the infrequent items
            Sequence optimizedSequence = sequence.cloneSequenceMinusItems(mapSequenceID, minSupportAbsolute);
            if (optimizedSequence.size() != 0) {
                /*
                 * If after remove the infrequent items, we remove all the items
                 * of an original sequence, we insert an empty pseudosequence
                 * in order not to affect to the absolute minimum support
                 */
                PseudoSequence pseudoSequence = new PseudoSequence(0, optimizedSequence, 0, 0);
                initialContext.addSequence(pseudoSequence);
            }
        }
        return initialContext;
    }

    /**
     * It clears all the attributes of AlgoPrefixSpan class
     */
    public void clear() {
        if (originalDataset != null) {
            originalDataset.clear();
            originalDataset = null;
        }
        if (saver != null) {
            saver.clear();
            saver = null;
        }
        abstractionCreator = null;
    }
}


text:
<?php namespace SeBuDesign\Buckaroo\Soap\Types\Responses\Common\Service;

use SeBuDesign\Buckaroo\Soap\Types\Responses\Common\Parameter\Parameter;
use SeBuDesign\Buckaroo\Soap\Types\Responses\Common\Parameter\ParametersInterface;
use SeBuDesign\Buckaroo\Soap\Types\Responses\Common\Parameter\ParametersTrait;

class Service implements ParametersInterface
{
    use ParametersTrait;

    /**
     * The name of the service
     *
     * @var string
     */
    protected $Name;

    /**
     * An array of response parameters
     *
     * @var \SeBuDesign\Buckaroo\Soap\Types\Responses\Common\Parameter\Parameter[]
     */
    protected $ResponseParameter;

    /**
     * Get the name of the service
     *
     * @return string
     */
    public function getName()
    {
        return $this->Name;
    }

    /**
     * Get all of the response parameters
     *
     * @return \SeBuDesign\Buckaroo\Soap\Types\Responses\Common\Parameter\Parameter[]
     */
    public function getParameters()
    {
        if ($this->ResponseParameter instanceof Parameter) {
            $this->ResponseParameter = [
                $this->ResponseParameter,
            ];
        }

        return $this->ResponseParameter;
    }
}


text:
import serial
import sys

data = sys.argv[1]
port = serial.Serial('/dev/ttyACM0', 9600)
port.write(data.encode())


text:
// These Codes are generated by kakaTools ExcelExport v2.0
// ------------------------------------------------------------------
//
// Copyright (c) 2015 linchen.
// All rights reserved.
//
// Email: superkaka.org@gmail.com
//
// ------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using KLib.utils;

public class StudentVO
{

    //名字
    private string _Name;
    public string Name
    {
        get { return _Name; }
    }

    //年龄
    private int _Age;
    public int Age
    {
        get { return _Age; }
    }

    //性别
    private bool _Sex;
    public bool Sex
    {
        get { return _Sex; }
    }

    //
    private float _Jump;
    public float Jump
    {
        get { return _Jump; }
    }

    //
    private DateTime _Time;
    public DateTime Time
    {
        get { return _Time; }
    }

    public void decode(EndianBinaryReader binReader)
    {

            _Name = binReader.ReadUTF();

            _Age = int.Parse(binReader.ReadUTF());

            var str_Sex = binReader.ReadUTF();
            _Sex = (str_Sex.ToLower() == "true" || str_Sex == "1");

            _Jump = float.Parse(binReader.ReadUTF());

            _Time = DateTime.Parse(binReader.ReadUTF());

    }

    static public void Fill(byte[] bytes)
    {

        var binReader = new EndianBinaryReader(Endian.LittleEndian, new MemoryStream(bytes));
        binReader.Endian = binReader.ReadBoolean() ? Endian.LittleEndian : Endian.BigEndian;

        var jumpPos = binReader.ReadInt32();

        //跳过表头信息
        binReader.BaseStream.Position = jumpPos;

        /*
        var headerCount = binReader.ReadInt32();
        var headers = new string[headerCount];
        var types = new string[headerCount];
        for (var i = 0; i < headerCount; i++)
        {
            headers[i] = binReader.ReadUTF();
            types[i] = binReader.ReadUTF();
        }
        */

        var count = binReader.ReadInt32();
        for (int i = 0; i < count; i++)
        {
            var vo = new StudentVO();
            vo.decode(binReader);
            list_vo.Add(vo);
            dic_vo.Add(vo.Name, vo);
        }

    }

    static private Dictionary<string, StudentVO> dic_vo = new Dictionary<string, StudentVO>();
    static private List<StudentVO> list_vo = new List<StudentVO>();

    static public IList<StudentVO> GetVOList()
    {
        return list_vo.AsReadOnly();
    }

    static public StudentVO GetVO(string Name)
    {
        return dic_vo[Name];
    }

    static public IList<StudentVO> Where(Func<StudentVO, bool> filter)
    {
        return list_vo.Where(filter).ToList();
    }

}


text:
<resources>

    <string name="title_activity_sigin">Sign in</string>

    <!-- Strings related to login -->
    <string name="prompt_username">Usuario</string>
    <string name="prompt_password">Contraseña</string>
    <string name="action_login">Entrar</string>
    <string name="action_reveal">Ver contraseña</string>
    <string name="action_sign_in_short">Sign in</string>
    <string name="action_remember">Recordar</string>
    <string name="error_invalid_username">El usuario es incorrecto</string>
    <string name="error_invalid_password">La contraseña es incorrecta</string>
    <string name="error_incorrect_password">La contraseña es incorrecta</string>
    <string name="error_field_required">Este campo es necesario</string>

    <string name="title_activity_sign_in">Sign in</string>

    <!-- Strings related to login -->
    <string name="prompt_email">Username</string>
    <string name="error">El usuario o contraseña está incorrecto</string>
    <string name="action_sign_in_register"><b>Sign in</b></string>
    <string name="action_forgot_password">Recover lost password</string>
    <string name="login_progress_signing_in">Signing in…</string>
    <string name="error_invalid_email">This username address is invalid</string>

</resources>


text:
package commands

import (
	"github.com/mesosphere/dcos-commons/cli/queries"
	"gopkg.in/alecthomas/kingpin.v3-unstable"
)

type describeHandler struct {
	q *queries.Package
}

func (cmd *describeHandler) handleDescribe(a *kingpin.Application, e *kingpin.ParseElement, c *kingpin.ParseContext) error {
	return cmd.q.Describe()
}

// HandleDescribeSection adds the describe subcommands to the provided kingpin.Application.
func HandleDescribeSection(app *kingpin.Application, q *queries.Package) {
	HandleDescribeCommands(app.Command("describe", "View the configuration for this service"), q)
}

// HandleUpdateCommands adds the describe subcommands to the provided kingpin.CmdClause.
func HandleDescribeCommands(describe *kingpin.CmdClause, q *queries.Package) {
	cmd := &describeHandler{q: q}
	describe.Action(cmd.handleDescribe)
}

type updateHandler struct {
	q              *queries.Package
	optionsFile    string
	packageVersion string
	replace        bool
}

func (cmd *updateHandler) ViewPackageVersions(a *kingpin.Application, e *kingpin.ParseElement, c *kingpin.ParseContext) error {
	return cmd.q.VersionInfo()
}

func (cmd *updateHandler) UpdateConfiguration(a *kingpin.Application, e *kingpin.ParseElement, c *kingpin.ParseContext) error {
	return cmd.q.Update(cmd.optionsFile, cmd.packageVersion, cmd.replace)
}

// HandleUpdateSection adds the update section to the provided kingpin.Application.
func HandleUpdateSection(app *kingpin.Application, packageQueries *queries.Package, planQueries *queries.Plan) {
	HandleUpdateCommands(app.Command("update", "Updates the package version or configuration for this DC/OS service"), packageQueries, planQueries)
}

// HandleUpdateCommands adds the update subcommands to the provided kingpin.CmdClause.
func HandleUpdateCommands(update *kingpin.CmdClause, packageQueries *queries.Package, planQueries *queries.Plan) {
	cmd := &updateHandler{q: packageQueries}

	start := update.Command("start", "Launches an update operation").Action(cmd.UpdateConfiguration)
	start.Flag("options", "Path to a JSON file that contains customized package installation options, or 'stdin' to read from stdin").StringVar(&cmd.optionsFile)
	start.Flag("package-version", "The desired package version").StringVar(&cmd.packageVersion)
	start.Flag("replace", "Replace the existing configuration in whole. Otherwise, the existing configuration and options are merged.").BoolVar(&cmd.replace)

	planCmd := &planHandler{q: planQueries}

	forceComplete := update.Command("force-complete", "Force complete a specific step in the provided phase").Alias("force").Action(planCmd.handleForceComplete)
	forceComplete.Arg("phase", "Name or UUID of the phase containing the provided step").Required().StringVar(&planCmd.phase)
	forceComplete.Arg("step", "Name or UUID of step to be restarted").Required().StringVar(&planCmd.step)

	forceRestart := update.Command("force-restart", "Restart update plan, or specific step in the provided phase").Alias("restart").Action(planCmd.handleForceRestart)
	forceRestart.Arg("phase", "Name or UUID of the phase containing the provided step").StringVar(&planCmd.phase)
	forceRestart.Arg("step", "Name or UUID of step to be restarted").StringVar(&planCmd.step)

	update.Command("package-versions", "View a list of available package versions to downgrade or upgrade to").Action(cmd.ViewPackageVersions)

	update.Command("pause", "Pause update plan").Alias("interrupt").Action(planCmd.handlePause)

	update.Command("resume", "Resume update plan").Alias("continue").Action(planCmd.handleResume)

	status := update.Command("status", "View status of a running update").Alias("show").Action(planCmd.handleStatus)
	status.Flag("json", "Show raw JSON response instead of user-friendly tree").BoolVar(&planCmd.rawJSON)
	// ensure plan name is passed
	status.Flag("plan", "Name of the plan to launch").Default("deploy").Hidden().StringVar(&planCmd.planName)
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/toons.iml" filepath="$PROJECT_DIR$/.idea/toons.iml" />
    </modules>
  </component>
</project>


text:
import request from '@/utils/request'

export function searchEvent(id) {
  return request({
    url: `/api/v0/events/${id}`,
    method: 'get'
  })
}

export function eventList(query) {
  return request({
    url: '/api/v0/events',
    method: 'get',
    params: query
  })
}


text:
package ch.qos.logback.classic.sift;

import ch.qos.logback.classic.ClassicConstants;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.joran.spi.DefaultClass;
import ch.qos.logback.core.sift.Discriminator;
import ch.qos.logback.core.sift.SiftingAppenderBase;
import org.slf4j.Marker;

/**
 * This appender can contains other appenders which it can build dynamically
 * depending on MDC values. The built appender is specified as part of a
 * configuration file.
 *
 * <p>See the logback manual for further details.
 *
 *
 * @author Ceki Gulcu
 */
public class SiftingAppender extends SiftingAppenderBase<ILoggingEvent> {

  @Override
  protected long getTimestamp(ILoggingEvent event) {
    return event.getTimeStamp();
  }

  @Override
  @DefaultClass(MDCBasedDiscriminator.class)
  public void setDiscriminator(Discriminator<ILoggingEvent> discriminator) {
    super.setDiscriminator(discriminator);
  }

  protected boolean eventMarksEndOfLife(ILoggingEvent event) {
    Marker marker = event.getMarker();
    if(marker == null)
      return false;

    return marker.contains(ClassicConstants.FINALIZE_SESSION_MARKER);
  }
}


text:
using Hyperledger.Indy.DidApi;
using Hyperledger.Indy.LedgerApi;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json.Linq;
using System.Threading.Tasks;

namespace Hyperledger.Indy.Test.LedgerTests
{
    [TestClass]
    public class RequestsTest : IndyIntegrationTestWithPoolAndSingleWallet
    {
        [TestMethod]
        public async Task TestSubmitRequestWorks()
        {
            var request = "{\"reqId\":1491566332010860,\n" +
                 "          \"identifier\":\"Th7MpTaRZVRYnPiabds81Y\",\n" +
                 "          \"operation\":{\n" +
                 "             \"type\":\"105\",\n" +
                 "             \"dest\":\"Th7MpTaRZVRYnPiabds81Y\"\n" +
                 "          },\n" +
                 "          \"protocolVersion\":2," +
                 "          \"signature\":\"4o86XfkiJ4e2r3J6Ufoi17UU3W5Zi9sshV6FjBjkVw4sgEQFQov9dxqDEtLbAJAWffCWd5KfAk164QVo7mYwKkiV\"}";

            var response = await Ledger.SubmitRequestAsync(pool, request);

            var responseObject = JObject.Parse(response);

            Assert.AreEqual("REPLY", (string)responseObject["op"]);
            Assert.AreEqual("105", (string)responseObject["result"]["type"]);
            Assert.AreEqual(1491566332010860L, (long)responseObject["result"]["reqId"]);
            Assert.AreEqual("{\"dest\":\"Th7MpTaRZVRYnPiabds81Y\",\"identifier\":\"V4SGRU86Z58d6TV7PBUe6f\",\"role\":\"2\",\"seqNo\":2,\"txnTime\":null,\"verkey\":\"~7TYfekw4GUagBnBVCqPjiC\"}", (string)responseObject["result"]["data"]);
            Assert.AreEqual("Th7MpTaRZVRYnPiabds81Y", (string)responseObject["result"]["identifier"]);
            Assert.AreEqual("Th7MpTaRZVRYnPiabds81Y", (string)responseObject["result"]["dest"]);
        }

        [TestMethod]
        public async Task TestSignAndSubmitRequestWorks()
        {
            var trusteeDidResult = await Did.CreateAndStoreMyDidAsync(wallet, TRUSTEE_IDENTITY_JSON);
            var trusteeDid = trusteeDidResult.Did;

            var myDidResult = await Did.CreateAndStoreMyDidAsync(wallet, "{}");
            var myDid = myDidResult.Did;

            var nymRequest = await Ledger.BuildNymRequestAsync(trusteeDid, myDid, null, null, null);
            var nymResponse = await Ledger.SignAndSubmitRequestAsync(pool, wallet, trusteeDid, nymRequest);
            Assert.IsNotNull(nymResponse);
        }

        [TestMethod]
        public async Task TestSignAndSubmitRequestWorksForNotFoundSigner()
        {
            var signerDidJson = "{\"seed\":\"00000000000000000000UnknowSigner\"}";

            var trusteeDidResult = await Did.CreateAndStoreMyDidAsync(wallet, signerDidJson);
            var signerDid = trusteeDidResult.Did;

            var myDidResult = await Did.CreateAndStoreMyDidAsync(wallet, "{}");
            var myDid = myDidResult.Did;

            var nymRequest = await Ledger.BuildNymRequestAsync(signerDid, myDid, null, null, null);

            var response = await Ledger.SignAndSubmitRequestAsync(pool, wallet, signerDid, nymRequest);
            CheckResponseType(response, "REQNACK");
        }
    }
}


text:
package org.gradle.api.java.archives;

import groovy.lang.Closure;
import org.gradle.api.Action;

/**
 * Specifies how the entries of multiple manifests should be merged together.
 */
public interface ManifestMergeSpec {

    /**
     * The character set used to decode the merged manifest content.
     * Defaults to UTF-8.
     *
     * @return the character set used to decode the merged manifest content
     * @since 2.14
     */
    String getContentCharset();

    /**
     * The character set used to decode the merged manifest content.
     *
     * @param contentCharset the character set used to decode the merged manifest content
     * @see #getContentCharset()
     * @since 2.14
     */
    void setContentCharset(String contentCharset);

    /**
     * Adds a merge path to a manifest that should be merged into the base manifest. A merge path can be either another
     * {@link org.gradle.api.java.archives.Manifest} or a path that is evaluated as per
     * {@link org.gradle.api.Project#files(Object...)} . If multiple merge paths are specified, the manifest are merged
     * in the order in which they are added.
     *
     * @param mergePaths The paths of manifests to be merged
     * @return this
     */
    ManifestMergeSpec from(Object... mergePaths);

    /**
     * Adds an action to be applied to each key-value tuple in a merge operation. If multiple merge paths are specified,
     * the action is called for each key-value tuple of each merge operation. The given action is called with a
     * {@link org.gradle.api.java.archives.ManifestMergeDetails} as its parameter. Actions are executed
     * in the order added.
     *
     * @param mergeAction A merge action to be executed.
     * @return this
     */
    ManifestMergeSpec eachEntry(Action<? super ManifestMergeDetails> mergeAction);

    /**
     * Adds an action to be applied to each key-value tuple in a merge operation. If multiple merge paths are specified,
     * the action is called for each key-value tuple of each merge operation. The given closure is called with a
     * {@link org.gradle.api.java.archives.ManifestMergeDetails} as its parameter. Actions are executed
     * in the order added.
     *
     * @param mergeAction The action to execute.
     * @return this
     */
    ManifestMergeSpec eachEntry(Closure<?> mergeAction);
}


text:
          #ifndef AviaryCommon_JOBSTATUSTYPE_H
          #define AviaryCommon_JOBSTATUSTYPE_H

       /**
        * JobStatusType.h
        *
        * This file was auto-generated from WSDL
        * by the Apache Axis2/Java version: 1.0  Built on : Sep 18, 2012 (08:44:08 EDT)
        */

       /**
        *  JobStatusType class
        */

        namespace AviaryCommon{
            class JobStatusType;
        }

        #include <axutil_qname.h>

        #include <stdio.h>
        #include <OMElement.h>
        #include <ServiceClient.h>
        #include <ADBDefines.h>

namespace AviaryCommon
{

        /* Enumeration for this type */
        typedef enum {
            JobStatusType_IDLE,
            JobStatusType_RUNNING,
            JobStatusType_REMOVED,
            JobStatusType_COMPLETED,
            JobStatusType_HELD,
            JobStatusType_TRANSFERRING_OUTPUT,
            JobStatusType_SUSPENDED
        } ADBJobStatusTypeEnum;

        class JobStatusType {

        private:

                axutil_qname_t* qname;
            std::string property_JobStatusType;

                bool isValidJobStatusType;

        /*** Private methods ***/

        bool WSF_CALL
        setJobStatusTypeNil();

        /******************************* public functions *********************************/

        public:

        /**
         * Constructor for class JobStatusType
         */

        JobStatusType();

        /**
         * Destructor JobStatusType
         */
        ~JobStatusType();

        /**
         * Constructor for creating JobStatusType
         * @param
         * @param JobStatusType std::string
         * @return newly created JobStatusType object
         */
        JobStatusType(std::string arg_JobStatusType);
        JobStatusType(const ADBJobStatusTypeEnum arg_JobStatusType);

        /**
         * resetAll for JobStatusType
         */
        WSF_EXTERN bool WSF_CALL resetAll();

        /********************************** Class get set methods **************************************/

        /**
         * Getter for JobStatusType.
         * @return std::string*
         */
        WSF_EXTERN std::string WSF_CALL
        getJobStatusType();

        /**
         * Setter for JobStatusType.
         * @param arg_JobStatusType std::string*
         * @return true on success, false otherwise
         */
        WSF_EXTERN bool WSF_CALL
        setJobStatusType(const std::string  arg_JobStatusType);

        /**
         * Re setter for JobStatusType
         * @return true on success, false
         */
        WSF_EXTERN bool WSF_CALL
        resetJobStatusType();

            /************************** Getters and Setters For Enumerations ********************************/
            /********************* Enumeration Specific Operations: get_enum, set_enum **********************/

            /**
            * Enum getter for JobStatusType.
            * @return ADBJobStatusTypeEnum; -1 on failure
            */
            ADBJobStatusTypeEnum WSF_CALL
            getJobStatusTypeEnum();

            /**
            * Enum setter for JobStatusType.
            * @param arg_JobStatusType ADBJobStatusTypeEnum
            * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
            */
            bool WSF_CALL
            setJobStatusTypeEnum(
            const ADBJobStatusTypeEnum arg_JobStatusType);

        /******************************* Checking and Setting NIL values *********************************/

        /**
         * NOTE: set_nil is only available for nillable properties
         */

        /**
         * Check whether JobStatusType is Nill
         * @return true if the element is Nil, false otherwise
         */
        bool WSF_CALL
        isJobStatusTypeNil();

        /**************************** Serialize and De serialize functions ***************************/
        /*********** These functions are for use only inside the generated code *********************/

        /**
         * Deserialize the content from a string to an ADB object
         * @param node_value to deserialize
         * @param parent_element The parent element if it is an element, NULL otherwise
         * @return true on success, false otherwise
         */
       bool WSF_CALL
       deserializeFromString(const axis2_char_t *node_value, axiom_node_t *parent);

        /**
         * Deserialize the ADB object to an XML
         * @param dp_parent double pointer to the parent node to be deserialized
         * @param dp_is_early_node_valid double pointer to a flag (is_early_node_valid?)
         * @param dont_care_minoccurs Dont set errors on validating minoccurs,
         *              (Parent will order this in a case of choice)
         * @return true on success, false otherwise
         */
        bool WSF_CALL
        deserialize(axiom_node_t** omNode, bool *isEarlyNodeValid, bool dontCareMinoccurs);

       /**
         * Declare namespace in the most parent node
         * @param parent_element parent element
         * @param namespaces hash of namespace uri to prefix
         * @param next_ns_index pointer to an int which contain the next namespace index
         */
        void WSF_CALL
        declareParentNamespaces(axiom_element_t *parent_element, axutil_hash_t *namespaces, int *next_ns_index);

        /**
         * Serialize ADB object to a string
         * @param namespaces hash which contains a mapping of namespace uris to prefixes
         * @return serialized string
         */
         char* WSF_CALL
         serializeToString(axutil_hash_t *namespaces);

        /**
         * Serialize the ADB object to an xml
         * @param JobStatusType_om_node node to serialize from
         * @param JobStatusType_om_element parent element to serialize from
         * @param tag_closed Whether the parent tag is closed or not
         * @param namespaces hash of namespace uris to prefixes
         * @param next_ns_index an int which contains the next namespace index
         * @return axiom_node_t on success,NULL otherwise.
         */
        axiom_node_t* WSF_CALL
        serialize(axiom_node_t* JobStatusType_om_node, axiom_element_t *JobStatusType_om_element, int tag_closed, axutil_hash_t *namespaces, int *next_ns_index);

        /**
         * Check whether the JobStatusType is a particle class (E.g. group, inner sequence)
         * @return true if this is a particle class, false otherwise.
         */
        bool WSF_CALL
        isParticle();

        /******************************* get the value by the property number  *********************************/
        /************NOTE: This method is introduced to resolve a problem in unwrapping mode *******************/

        /**
         * Getter for JobStatusType by property number (1)
         * @return std::string
         */

        std::string WSF_CALL
        getProperty1();

};

}
 #endif /* JOBSTATUSTYPE_H */


text:
require 'ar_finder_form'
module ArFinderForm
  class Column
    attr_reader :table, :name, :options
    attr_reader :form_attr
    def initialize(table, name, *args)
      @table, @name = table, name
      @options = args.extract_options!
      @static_values = args.empty? ? nil : args
    end

    def setup
      send("setup_#{setup_type}")
    end

    def build(context)
      @form_attr.build(context)
    end

    def static?
      !!@static_values
    end

    def foreign_key?
      name = self.name.to_s
      table.model_class.reflections.
        any?{|key, ref| ref.primary_key_name == name}
    end

    def model_column
      result = table.model_column_for(name)
      unless result.is_a?(ActiveRecord::ConnectionAdapters::Column)
        raise "Unsupported column object for #{table.name}.#{name}: #{result.inspect}"
      end
      result
    end

    def type
      @options[:type] || model_column.type
    end

    private
    def setup_type
      return 'match_static' if static?
      return 'match_range' if options[:range]
      return "match_#{options[:match]}" if options[:match]
      case type
      when :string, :text then
        'match_partial'
      when :integer then
        foreign_key? ? 'match_exactly' : 'match_range'
      when :float, :datetime, :date, :time then
        'match_range'
      else
        'match_exactly'
      end
    end

    def setup_match_static
      new_attr(Attr::Static, {:connector => 'AND'}, @static_values)
    end

    def setup_match_exactly
      new_attr(Attr::Simple, :operator => '=')
    end

    def setup_match_range
      new_attr(Attr::RangeAttrs, options.delete(:range))
    end

    Attr::Like::MATCHERS.keys.each do |matcher|
      class_eval(<<-EOS)
        def setup_match_#{matcher}
          new_attr(Attr::Like, :match => :#{matcher.to_s})
        end
      EOS
    end

    def new_attr(klass, default_options, *args)
      options = (default_options || {}).update(self.options)
      args << options
      @form_attr = klass.new(self, options[:attr] || name, *args)
      @form_attr.setup
      @form_attr
    end

  end
end


text:
layout: post
title:  "SFPC: Day 35 - Lazy Sunday"
date:   2016-11-13 20:00:00 -0400
categories: sunday, lazy, roommate hangs
---

Lazy day today. Woke up late, got breakfast with a friend, hung out with roommates, made dinner, watched a movie and crashed. Some days it's important to not work.

-----

Today

*A face on the sidewalk outside the AirBnb*

![Sidewalk face](/images/IMG_5619.jpg)

![Sidewalk face](/images/IMG_5620.jpg)

At around noon, hung out with the roommates and talked about the state of politics, Trump, gentrification. Is this what it feels like to be a revolutionary?

*A flyer from the Chinatown Arts Brigade's recent event about gentrification*

![Swale](/images/IMG_5621.jpg)

Made dinner, watched a movie, went to bed at a reasonable hour.

-----

**For Breakfast:**

Bacon breakfast burrito.

**For Dinner:**

Green curry chicken.

-----


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using GlennSarti.Neo4jRepublisher.Models;
using System.Security.Principal;
using System.Web.Routing;

namespace GlennSarti.Neo4jRepublisher.Controllers
{
    public class StoredProcController : ApiController
    {
      private WindowsPrincipal GetWindowsIdentity()
      {
        // TODO I don't like using dynamic types.  There must be a way to static type this!
        try
        {
          dynamic requestContext = Url.Request.Properties["MS_RequestContext"];
          System.Security.Principal.IIdentity requestIdentity = requestContext.Principal.Identity;

          if (!(requestIdentity is WindowsIdentity))
            return null;
          return new WindowsPrincipal((WindowsIdentity)requestIdentity);
        }
        catch
        {
          return null;
        }
      }

      // GET: /storedproc/
      [HttpGet]
      public Models.StoredProcedureList Get()
      {
        StoredProcedureList value = GlennSarti.Neo4jRepublisher.NeoStoredProcedures.NeoStoredProcedureRepository.AllowedStoredProcList(GetWindowsIdentity());

        // Modify the href links
        HttpRequestMessage request = Url.Request;
        foreach (StoredProcedure objProc in value.storedprocedures )
        {
          objProc.href = Url.Link("DefaultApi", new { id = objProc.name });
        }

        return value;
      }

      // GET: /storedproc/id
      [HttpGet]
      public Models.StoredProcedure Get(string id)
      {
        StoredProcedure value = GlennSarti.Neo4jRepublisher.NeoStoredProcedures.NeoStoredProcedureRepository.GetStoredProcedure(id, GetWindowsIdentity());

        // Modify the href links
        HttpRequestMessage request = Url.Request;
        value.href = Url.Link("DefaultApi", new { id = value.name });

        return value;
      }

      private void GetRequestParametersForNeo(
        ref GlennSarti.Neo4jRepublisher.NeoStoredProcedures.RequestParameterCollections requestParms,
        WindowsPrincipal requestUser)
      {
        requestParms.InternalParameters.Add("username", "");
        requestParms.InternalParameters.Add("userdomain", "");
        requestParms.InternalParameters.Add("samaccount", "");

        DateTime dteNow = DateTime.Now;
        DateTime dteUtcNow = DateTime.UtcNow;

        requestParms.InternalParameters.Add("now-local", dteNow.ToString("yyyy-MM-ddTHH:mm:ssZK"));
        requestParms.InternalParameters.Add("now-local-rfc1123", dteNow.ToString("r"));
        requestParms.InternalParameters.Add("now-local-sortable", dteNow.ToString("s"));
        requestParms.InternalParameters.Add("now-local-univsortable", dteNow.ToString("u"));

        requestParms.InternalParameters.Add("now-utc", dteUtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ"));
        requestParms.InternalParameters.Add("now-utc-rfc1123", dteUtcNow.ToString("r"));
        requestParms.InternalParameters.Add("now-utc-sortable", dteUtcNow.ToString("s"));
        requestParms.InternalParameters.Add("now-utc-univsortable", dteUtcNow.ToString("u"));

        if (requestUser != null)
        {
          requestParms.InternalParameters["sAMAccount"] = requestUser.Identity.Name.ToUpper();
          requestParms.InternalParameters["username"] = requestParms.InternalParameters["sAMAccount"];
          string[] userName = requestUser.Identity.Name.ToUpper().Split('\\');
          if (userName.GetUpperBound(0) > 0)
          {
            requestParms.InternalParameters["userdomain"] = userName[0];
            requestParms.InternalParameters["username"] = userName[1];
          }
        }
      }

      // POST: /storedproc/id
      // I'm using the NakedBody extension because the parsing of a Json payload into a dictionary object is almost impossible.  This is due to the way WebAPI does payload parsing out of the box
      // Instead, I'm grabbing the entire payload and then attempt to convert that into a dictionary.  Any errors cause all params to be invalid (i.e. null)
      [HttpPost]
      public async System.Threading.Tasks.Task<string> Post([NakedBody]string raw)
      {
        System.Web.Http.Routing.IHttpRouteData routeData = Request.GetRouteData();
        string id = routeData.Values["id"].ToString();

        // Try to convert the payload into a dictionary object;
        GlennSarti.Neo4jRepublisher.NeoStoredProcedures.RequestParameterCollections paramCollection = new NeoStoredProcedures.RequestParameterCollections();
        if ((raw != null) && (raw != ""))
        {
          paramCollection.ExternalParameters = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(raw);
        }

        WindowsPrincipal userPrincipal = GetWindowsIdentity();
        GetRequestParametersForNeo(ref paramCollection, userPrincipal);

        //TODO Need to figure out how to send this data back better
        //  Need to hook into the republisher handler better
        return await GlennSarti.Neo4jRepublisher.NeoStoredProcedures.NeoStoredProcedureRepository.ExecuteStoredProcedure(id,paramCollection, userPrincipal, Request);
      }
    }
}


text:
PROJECT = sse-server
DEPS = cowboy
include erlang.mk


text:
package vn.tale.architecture.common;

import android.support.annotation.VisibleForTesting;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import io.reactivex.ObservableTransformer;
import io.reactivex.schedulers.Schedulers;

/**
 * Created by Giang Nguyen on 2/26/17.
 */

public interface SchedulerObservableTransformer {

  @VisibleForTesting SchedulerObservableTransformer TEST = new SchedulerObservableTransformer() {
    @SuppressWarnings("unchecked")
    @Override public <T> ObservableTransformer<T, T> transformer() {
      return (ObservableTransformer<T, T>) new ObservableTransformer() {
        @Override public ObservableSource apply(Observable upstream) {
          return upstream.subscribeOn(Schedulers.trampoline())
              .observeOn(Schedulers.trampoline());
        }
      };
    }
  };

  <T> ObservableTransformer<T, T> transformer();
}


text:
class wxPipe
{
public:
    // the symbolic names for the pipe ends
    enum Direction
    {
        Read,
        Write
    };

    enum
    {
        INVALID_FD = -1
    };

    // default ctor doesn't do anything
    wxPipe() { m_fds[Read] = m_fds[Write] = INVALID_FD; }

    // create the pipe, return TRUE if ok, FALSE on error
    bool Create()
    {
        if ( pipe(m_fds) == -1 )
        {
            wxLogSysError(_("Pipe creation failed"));

            return false;
        }

        return true;
    }

    // switch the given end of the pipe to non-blocking IO
    bool MakeNonBlocking(Direction which)
    {
        const int flags = fcntl(m_fds[which], F_GETFL, 0);
        if ( flags == -1 )
            return false;

        return fcntl(m_fds[which], F_SETFL, flags | O_NONBLOCK) == 0;
    }

    // return TRUE if we were created successfully
    bool IsOk() const { return m_fds[Read] != INVALID_FD; }

    // return the descriptor for one of the pipe ends
    int operator[](Direction which) const { return m_fds[which]; }

    // detach a descriptor, meaning that the pipe dtor won't close it, and
    // return it
    int Detach(Direction which)
    {
        int fd = m_fds[which];
        m_fds[which] = INVALID_FD;

        return fd;
    }

    // close the pipe descriptors
    void Close()
    {
        for ( size_t n = 0; n < WXSIZEOF(m_fds); n++ )
        {
            if ( m_fds[n] != INVALID_FD )
            {
                close(m_fds[n]);
                m_fds[n] = INVALID_FD;
            }
        }
    }

    // dtor closes the pipe descriptors
    ~wxPipe() { Close(); }

private:
    int m_fds[2];
};

#if wxUSE_STREAMS && wxUSE_FILE

#include "wx/wfstream.h"

// ----------------------------------------------------------------------------
// wxPipeInputStream: stream for reading from a pipe
// ----------------------------------------------------------------------------

class wxPipeInputStream : public wxFileInputStream
{
public:
    wxPipeInputStream(int fd) : wxFileInputStream(fd) { }

    // return TRUE if the pipe is still opened
    bool IsOpened() const { return !Eof(); }

    // return TRUE if we have anything to read, don't block
    virtual bool CanRead() const;
};

// ----------------------------------------------------------------------------
// wxPipeOutputStream: stream for writing to a pipe
// ----------------------------------------------------------------------------

class wxPipeOutputStream : public wxFileOutputStream
{
public:
    wxPipeOutputStream(int fd) : wxFileOutputStream(fd) { }

    // Override the base class version to ignore "pipe full" errors: this is
    // not an error for this class.
    size_t OnSysWrite(const void *buffer, size_t size);
};

#endif // wxUSE_STREAMS && wxUSE_FILE

#endif // _WX_UNIX_PIPE_H_


text:
package co.cask.cdap.internal.app.runtime.plugin;

import co.cask.cdap.api.annotation.Beta;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type;

/**
 * Provides access to plugin endpoint. get request type of method parameter, invoke plugin method and get response.
 */
@Beta
public interface PluginEndpoint {
  /**
   * get the type of method parameter
   *
   * @return Type of method's first parameter
   * @throws IllegalArgumentException if argument list is empty
   */
  Type getMethodParameterType() throws IllegalArgumentException;

  /**
   * get the return type of plugin method
   *
   * @return return type of method
   */
  Type getResultType();

  /**
   * invoke method with the request object as parameter.
   *
   * @param reqest request object
   * @return result from invoking the object
   * @throws IOException when instantiating plugin before invoking method on it
   * @throws ClassNotFoundException when instantiating plugin before invoking method on it
   * @throws InvocationTargetException method invoke can throw
   * @throws IllegalAccessException method invoke can throw
   * @throws IllegalArgumentException method invoke can throw
   */
  Object invoke(Object reqest) throws IOException, ClassNotFoundException,
    InvocationTargetException, IllegalAccessException, IllegalArgumentException;
}


text:
layout: post
title: The expansion of numbers
categories:
- Learning
---

> There are 10^11 stars in the galaxy. That used to be a huge number. But it's only a hundred billion. It's less than the national deficit! We used to call them astronomical numbers. Now we should call them economical numbers. ~ Richard Feynman

It used to be that only astronomical numbers were huge. The financial number have caught up and now we do see number in **trillions**. And not surprisingly, the [internet number are also catching up](http://news.bbc.co.uk/2/hi/technology/8552410.stm) in **millions** and **billions**...

![](/img/visualise-internet.jpg "visualise-internet")

[iTunes](http://www.apple.com/itunes/billion-app-countdown/) had 1 billion apps downloaded last year. Just recently, all in the month of July 2010,  [Foursquare](http://mashable.com/2010/07/20/foursquare-100-million-checkins/) had 100 million check-ins, [Wordpress](http://wordpress.org/news/2010/07/100-million/) had 100 million plugin downloads, [Netflix](http://techcrunch.com/2010/07/21/netflix-users/) had 15 million users and [Facebook](http://blog.facebook.com/blog.php?post=409753352130) reached 500 million users. 500 million users is a huge number... granted there can be many duplicates, even 400 million is a huge number.

So, any guesses when is the next time a web app will reach 1 billion user base? With such a fast penetration of the internet, I hope more people will be able to access it cheaper in the coming years.

I would say 2015... 5 more years for a web app to reach 1 billion user base. What do you say?


text:
"use strict"

var serializeArchives = require("../lib/serialize_archives_agents_utils.js")
var serializeMms = require("../lib/serialize_mms_agents_utils.js")
var serializeTms = require("../lib/serialize_tms_agents_utils.js")

serializeArchives.populateArchivesAgentsCollctions(function(){
	serializeArchives.populateArchivesAgentsComponents(function(){
 		serializeTms.populateTmsAgents(function(){
			serializeMms.populateMmsAgentsCollections(function(){
 				serializeMms.populateMmsAgentsContainers(function(){
					serializeMms.populateMmsAgentsItems(function(){
						console.log('Done');
						process.exit()
					})
				})
			})
 		})
	})
})


text:
using System;
using System.Globalization;

public static partial class Extensions
{
    /// <summary>
    ///     A DateTime extension method that converts this object to a year month string.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <returns>The given data converted to a string.</returns>
    public static string ToYearMonthString(this DateTime @this)
    {
        return @this.ToString("y", DateTimeFormatInfo.CurrentInfo);
    }

    /// <summary>
    ///     A DateTime extension method that converts this object to a year month string.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <param name="culture">The culture.</param>
    /// <returns>The given data converted to a string.</returns>
    public static string ToYearMonthString(this DateTime @this, string culture)
    {
        return @this.ToString("y", new CultureInfo(culture));
    }

    /// <summary>
    ///     A DateTime extension method that converts this object to a year month string.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <param name="culture">The culture.</param>
    /// <returns>The given data converted to a string.</returns>
    public static string ToYearMonthString(this DateTime @this, CultureInfo culture)
    {
        return @this.ToString("y", culture);
    }
}


text:
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "AI/BaseEnemyCharacter.h"
#include "MeleeEnemyCharacter.generated.h"

/**
 *
 */
UCLASS()
class RNC_API AMeleeEnemyCharacter : public ABaseEnemyCharacter
{
	GENERATED_BODY()

private:

	const FName UpperSphereSocket = "UpperSphereSocket";

	const FName LowerSphereSocket = "LowerSphereSocket";

	const FName ForceAttackKey = "ForceAttack";

public:

	AMeleeEnemyCharacter();

	virtual void Tick(float DeltaTime) override;

	/*Attacks the player*/
	virtual void Attack() override;

	/*Cancel the patrol system and hunt down the player*/
	void EnableHunting();

protected:
	UPROPERTY(EditAnywhere, Category=Combat)
	float AttackRaycastRadius;
};


text:
<?php

namespace WellCommerce\Bundle\ProductBundle\Tests\Repository;

use WellCommerce\Bundle\CoreBundle\Test\Repository\AbstractRepositoryTestCase;

/**
 * Class ProductRepositoryTest
 *
 * @author  Adam Piotrowski <adam@wellcommerce.org>
 */
class ProductRepositoryTest extends AbstractRepositoryTestCase
{
    protected function getAlias()
    {
        return 'product';
    }

    protected function get()
    {
        return $this->container->get('product.repository');
    }
}


text:
package com.amazonaws.services.waf.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * <note>
 *

 * This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the
 * developer guide.
 *

 *

 * For the latest version of AWS WAF, use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the
 * latest version, AWS WAF has a single set of endpoints for regional and global use.
 *

 * </note>
 *

 * A complex type that contains SqlInjectionMatchTuple objects, which specify the parts of web requests
 * that you want AWS WAF to inspect for snippets of malicious SQL code and, if you want AWS WAF to inspect a header, the
 * name of the header. If a SqlInjectionMatchSet contains more than one SqlInjectionMatchTuple
 * object, a request needs to include snippets of SQL code in only one of the specified parts of the request to be
 * considered a match.
 *

 *
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SqlInjectionMatchSet implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId to get
     * information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update a
     * SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     * SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     * UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     * DeleteSqlInjectionMatchSet).
     *

     *

     * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     * ListSqlInjectionMatchSets.
     *

     */
    private String sqlInjectionMatchSetId;
    /**
     *

     * The name, if any, of the SqlInjectionMatchSet.
     *

     */
    private String name;
    /**
     *

     * Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     *

     */
    private java.util.List<SqlInjectionMatchTuple> sqlInjectionMatchTuples;

    /**
     *

     * A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId to get
     * information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update a
     * SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     * SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     * UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     * DeleteSqlInjectionMatchSet).
     *

     *

     * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     * ListSqlInjectionMatchSets.
     *

     *
     * @param sqlInjectionMatchSetId
     *        A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
     *        to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update
     *        a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     *        SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     *        UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     *        DeleteSqlInjectionMatchSet).

     *

     *        SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     *        ListSqlInjectionMatchSets.
     */

    public void setSqlInjectionMatchSetId(String sqlInjectionMatchSetId) {
        this.sqlInjectionMatchSetId = sqlInjectionMatchSetId;
    }

    /**
     *

     * A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId to get
     * information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update a
     * SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     * SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     * UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     * DeleteSqlInjectionMatchSet).
     *

     *

     * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     * ListSqlInjectionMatchSets.
     *

     *
     * @return A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
     *         to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update
     *         a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     *         SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     *         UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     *         DeleteSqlInjectionMatchSet).

     *

     *         SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     *         ListSqlInjectionMatchSets.
     */

    public String getSqlInjectionMatchSetId() {
        return this.sqlInjectionMatchSetId;
    }

    /**
     *

     * A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId to get
     * information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update a
     * SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     * SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     * UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     * DeleteSqlInjectionMatchSet).
     *

     *

     * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     * ListSqlInjectionMatchSets.
     *

     *
     * @param sqlInjectionMatchSetId
     *        A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId
     *        to get information about a SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update
     *        a SqlInjectionMatchSet (see UpdateSqlInjectionMatchSet), insert a
     *        SqlInjectionMatchSet into a Rule or delete one from a Rule (see
     *        UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF (see
     *        DeleteSqlInjectionMatchSet).

     *

     *        SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by
     *        ListSqlInjectionMatchSets.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SqlInjectionMatchSet withSqlInjectionMatchSetId(String sqlInjectionMatchSetId) {
        setSqlInjectionMatchSetId(sqlInjectionMatchSetId);
        return this;
    }

    /**
     *

     * The name, if any, of the SqlInjectionMatchSet.
     *

     *
     * @param name
     *        The name, if any, of the SqlInjectionMatchSet.
     */

    public void setName(String name) {
        this.name = name;
    }

    /**
     *

     * The name, if any, of the SqlInjectionMatchSet.
     *

     *
     * @return The name, if any, of the SqlInjectionMatchSet.
     */

    public String getName() {
        return this.name;
    }

    /**
     *

     * The name, if any, of the SqlInjectionMatchSet.
     *

     *
     * @param name
     *        The name, if any, of the SqlInjectionMatchSet.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SqlInjectionMatchSet withName(String name) {
        setName(name);
        return this;
    }

    /**
     *

     * Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     *

     *
     * @return Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     */

    public java.util.List<SqlInjectionMatchTuple> getSqlInjectionMatchTuples() {
        return sqlInjectionMatchTuples;
    }

    /**
     *

     * Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     *

     *
     * @param sqlInjectionMatchTuples
     *        Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     */

    public void setSqlInjectionMatchTuples(java.util.Collection<SqlInjectionMatchTuple> sqlInjectionMatchTuples) {
        if (sqlInjectionMatchTuples == null) {
            this.sqlInjectionMatchTuples = null;
            return;
        }

        this.sqlInjectionMatchTuples = new java.util.ArrayList<SqlInjectionMatchTuple>(sqlInjectionMatchTuples);
    }

    /**
     *

     * Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setSqlInjectionMatchTuples(java.util.Collection)} or
     * {@link #withSqlInjectionMatchTuples(java.util.Collection)} if you want to override the existing values.
     *

     *
     * @param sqlInjectionMatchTuples
     *        Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SqlInjectionMatchSet withSqlInjectionMatchTuples(SqlInjectionMatchTuple... sqlInjectionMatchTuples) {
        if (this.sqlInjectionMatchTuples == null) {
            setSqlInjectionMatchTuples(new java.util.ArrayList<SqlInjectionMatchTuple>(sqlInjectionMatchTuples.length));
        }
        for (SqlInjectionMatchTuple ele : sqlInjectionMatchTuples) {
            this.sqlInjectionMatchTuples.add(ele);
        }
        return this;
    }

    /**
     *

     * Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     *

     *
     * @param sqlInjectionMatchTuples
     *        Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SqlInjectionMatchSet withSqlInjectionMatchTuples(java.util.Collection<SqlInjectionMatchTuple> sqlInjectionMatchTuples) {
        setSqlInjectionMatchTuples(sqlInjectionMatchTuples);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSqlInjectionMatchSetId() != null)
            sb.append("SqlInjectionMatchSetId: ").append(getSqlInjectionMatchSetId()).append(",");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getSqlInjectionMatchTuples() != null)
            sb.append("SqlInjectionMatchTuples: ").append(getSqlInjectionMatchTuples());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof SqlInjectionMatchSet == false)
            return false;
        SqlInjectionMatchSet other = (SqlInjectionMatchSet) obj;
        if (other.getSqlInjectionMatchSetId() == null ^ this.getSqlInjectionMatchSetId() == null)
            return false;
        if (other.getSqlInjectionMatchSetId() != null && other.getSqlInjectionMatchSetId().equals(this.getSqlInjectionMatchSetId()) == false)
            return false;
        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getSqlInjectionMatchTuples() == null ^ this.getSqlInjectionMatchTuples() == null)
            return false;
        if (other.getSqlInjectionMatchTuples() != null && other.getSqlInjectionMatchTuples().equals(this.getSqlInjectionMatchTuples()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getSqlInjectionMatchSetId() == null) ? 0 : getSqlInjectionMatchSetId().hashCode());
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getSqlInjectionMatchTuples() == null) ? 0 : getSqlInjectionMatchTuples().hashCode());
        return hashCode;
    }

    @Override
    public SqlInjectionMatchSet clone() {
        try {
            return (SqlInjectionMatchSet) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.waf.model.waf_regional.transform.SqlInjectionMatchSetMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
layout: post
title: Bathtub fuck with Jayden, Isis, and Anthony
titleinfo: pornvd
desc: Watch Bathtub fuck with Jayden, Isis, and Anthony. Pornhub is the ultimate xxx porn and sex site.
---

Bathtub fuck with Jayden, Isis, and Anthony

Watch Bathtub fuck with Jayden, Isis, and Anthony. Pornhub is the ultimate xxx porn and sex site.


text:
using System;

namespace SharpMath.Optimization
{
	[Serializable]
	public class BfgsOptimizerResult : OptimizerResult
	{
		public BfgsOptimizerResult(bool status, IPoint optimalPoint, double optimalValue, BfgsOptimizerConvergenceStatus convergenceStatus)
			: base(status, optimalPoint, optimalValue)
		{
			ConvergenceStatus = convergenceStatus;
		}

		public BfgsOptimizerConvergenceStatus ConvergenceStatus
		{
			get;
			private set;
		}
	}
}


text:
package com.amazonaws.services.codepipeline.model.transform;

import java.util.Map;
import java.util.Map.Entry;
import java.math.*;
import java.nio.ByteBuffer;

import com.amazonaws.services.codepipeline.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;

import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;

/**
 * JobData JSON Unmarshaller
 */
public class JobDataJsonUnmarshaller implements
        Unmarshaller<JobData, JsonUnmarshallerContext> {

    public JobData unmarshall(JsonUnmarshallerContext context) throws Exception {
        JobData jobData = new JobData();

        int originalDepth = context.getCurrentDepth();
        String currentParentElement = context.getCurrentParentElement();
        int targetDepth = originalDepth + 1;

        JsonToken token = context.getCurrentToken();
        if (token == null)
            token = context.nextToken();
        if (token == VALUE_NULL)
            return null;

        while (true) {
            if (token == null)
                break;

            if (token == FIELD_NAME || token == START_OBJECT) {
                if (context.testExpression("actionTypeId", targetDepth)) {
                    context.nextToken();
                    jobData.setActionTypeId(ActionTypeIdJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
                if (context.testExpression("actionConfiguration", targetDepth)) {
                    context.nextToken();
                    jobData.setActionConfiguration(ActionConfigurationJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
                if (context.testExpression("pipelineContext", targetDepth)) {
                    context.nextToken();
                    jobData.setPipelineContext(PipelineContextJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
                if (context.testExpression("inputArtifacts", targetDepth)) {
                    context.nextToken();
                    jobData.setInputArtifacts(new ListUnmarshaller<Artifact>(
                            ArtifactJsonUnmarshaller.getInstance())
                            .unmarshall(context));
                }
                if (context.testExpression("outputArtifacts", targetDepth)) {
                    context.nextToken();
                    jobData.setOutputArtifacts(new ListUnmarshaller<Artifact>(
                            ArtifactJsonUnmarshaller.getInstance())
                            .unmarshall(context));
                }
                if (context.testExpression("artifactCredentials", targetDepth)) {
                    context.nextToken();
                    jobData.setArtifactCredentials(AWSSessionCredentialsJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
                if (context.testExpression("continuationToken", targetDepth)) {
                    context.nextToken();
                    jobData.setContinuationToken(context.getUnmarshaller(
                            String.class).unmarshall(context));
                }
                if (context.testExpression("encryptionKey", targetDepth)) {
                    context.nextToken();
                    jobData.setEncryptionKey(EncryptionKeyJsonUnmarshaller
                            .getInstance().unmarshall(context));
                }
            } else if (token == END_ARRAY || token == END_OBJECT) {
                if (context.getLastParsedParentElement() == null
                        || context.getLastParsedParentElement().equals(
                                currentParentElement)) {
                    if (context.getCurrentDepth() <= originalDepth)
                        break;
                }
            }
            token = context.nextToken();
        }

        return jobData;
    }

    private static JobDataJsonUnmarshaller instance;

    public static JobDataJsonUnmarshaller getInstance() {
        if (instance == null)
            instance = new JobDataJsonUnmarshaller();
        return instance;
    }
}


text:
var expect = require('chai').expect;
var runner = require('../runner');

describe( 'racket runner', function(){
    describe( '.run', function(){
        it( 'should handle basic code evaluation', function(done){
            runner.run({language: 'racket', code: '(print 42)'}, function(buffer) {
                expect(buffer.stdout).to.equal('42');
                done();
            });
        });

        it('should handle setup code and imports', function (done) {
            runner.run({
                language: 'racket',
                setup: [
                    '#lang racket/base',
                    '(provide twice)',
                    '(define (twice x) (+ x x))'
                ].join('\n'),
                code: [
                    "(print (twice 2))"
                ].join('\n')
            }, function (buffer) {
                expect(buffer.stdout).to.equal('4');
                done();
            });
        });

   });
});


text:
package org.drools.core.impl;

import java.io.IOException;

import org.drools.core.common.InternalFactHandle;
import org.drools.core.common.PropagationContextFactory;
import org.drools.core.common.ReteEvaluator;
import org.drools.core.common.WorkingMemoryAction;
import org.drools.core.definitions.InternalKnowledgePackage;
import org.drools.core.definitions.rule.impl.RuleImpl;
import org.drools.core.marshalling.impl.MarshallerReaderContext;
import org.drools.core.phreak.PropagationEntry;
import org.drools.core.reteoo.RuntimeComponentFactory;
import org.drools.core.spi.PropagationContext;
import org.drools.core.spi.Tuple;

public class WorkingMemoryReteAssertAction
        extends PropagationEntry.AbstractPropagationEntry
        implements WorkingMemoryAction {
    protected InternalFactHandle factHandle;

    protected boolean            removeLogical;

    protected boolean            updateEqualsMap;

    protected RuleImpl ruleOrigin;

    protected Tuple tuple;

    protected WorkingMemoryReteAssertAction() { }

    public WorkingMemoryReteAssertAction(MarshallerReaderContext context) throws IOException {
        this.factHandle = context.getHandles().get( context.readLong() );
        this.removeLogical = context.readBoolean();
        this.updateEqualsMap = context.readBoolean();

        if ( context.readBoolean() ) {
            String pkgName = context.readUTF();
            String ruleName = context.readUTF();
            InternalKnowledgePackage pkg = context.getKnowledgeBase().getPackage( pkgName );
            this.ruleOrigin = pkg.getRule( ruleName );
        }
        if ( context.readBoolean() ) {
            this.tuple = context.getTerminalTupleMap().get( context.readInt() );
        }
    }

    public void execute(ReteEvaluator reteEvaluator) {
        PropagationContextFactory pctxFactory = RuntimeComponentFactory.get().getPropagationContextFactory();

        final PropagationContext context = pctxFactory.createPropagationContext(reteEvaluator.getNextPropagationIdCounter(), PropagationContext.Type.INSERTION,
                this.ruleOrigin, this.tuple != null ? this.tuple.getTupleSink() : null, this.factHandle);
        reteEvaluator.getKnowledgeBase().getRete().assertObject(this.factHandle, context, reteEvaluator);
    }
}


text:
package io.quarkus.it.spring.data.jpa;

import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
public class MovieResourceIT extends MovieResourceTest {
}


text:
#pragma once

/**
 *  @file Statistic.h
 *  @date April 13, 2016
 *  @author jeremiah
 *
 *  @brief Used for recording numerical statistics.
 */

#include "EngineDefines.h"

namespace Core
{
    template<typename T>
    class Statistic
    {
    public:

        using value_type = T;

        Statistic( uint32_t maxSamples = 1024 )
            : m_MaxSamples( maxSamples )
        {
            m_Samples.resize( m_MaxSamples );
            Reset();
        }

        // Reset samples.
        void Reset()
        {
            m_NumSamples = 0;
            m_Total = 0;
            m_Average = 0;
            m_Min = std::numeric_limits<T>::max();
            m_Max = std::numeric_limits<T>::min();
        }

        void Sample( T value )
        {
            m_Samples[m_NumSamples++ % m_MaxSamples] = value;

            m_Total += value;
            m_Average = m_Total / m_NumSamples;
            m_Max = std::max( m_Max, value );
            m_Min = std::min( m_Min, value );
        }

        uint32_t GetNumSamples() const
        {
            return m_NumSamples;
        }

        T GetAverage() const
        {
            return m_Average;
        }

        T GetMax() const
        {
            return m_Max;
        }

        T GetMin() const
        {
            return m_Min;
        }

        T GetLast() const
        {
            return m_Samples[( m_NumSamples + m_MaxSamples - 1 ) % m_MaxSamples];
        }

        /**
         * Get the variance of the samples.
         * Since the variance can only be computed once the average
         * of all of the samples is known, we must compute it each time
         * the value is requested. Use this function sparingly.
         */
        T GetVariance() const
        {
            T variance = 0.0;

            uint32_t numSamples = std::min( m_NumSamples, m_MaxSamples );
            for ( uint32_t i = 0; i < numSamples; ++i )
            {
                variance += std::pow( m_Samples[i] - m_Average, 2 );
            }

            return variance / static_cast<T>( numSamples );
        }

        /**
         * Get the standard deviation of the samples.
         * This requires the variance to be computed.
         */
        double GetStandardDeviation() const
        {
            return std::sqrt( GetVariance() );
        }

        /**
         * Get all the samples recorded.
         * @return A tuple where the first value is a pointer to the samples array
         * and the second value is the number of recorded samples and the third value
         * is the offset into the array to access the first sample in the ring buffer.
         */
        std::tuple<const T*, uint32_t, uint32_t> GetSamples() const
        {
            return std::make_tuple( m_Samples.data(), m_MaxSamples, m_NumSamples % m_MaxSamples );
        }

    private:
        // Maximum number of samples to record.
        uint32_t m_MaxSamples;

        // Number of recorded samples.
        uint32_t m_NumSamples;

        T m_Total;
        T m_Average;
        T m_Min;
        T m_Max;

        std::vector<T> m_Samples;
    };
}


text:
var path = require('path');
var version = require('./package.json').version;
var ExtractTextPlugin = require('extract-text-webpack-plugin');

var banner =
  '/*!\n' +
  ' * Keen UI v' + version + ' (https://github.com/JosephusPaye/keen-ui)\n' +
  ' * (c) ' + new Date().getFullYear() + ' Josephus Paye II\n' +
  ' * Released under the MIT License.\n' +
  ' */';

module.exports = {
    watch: true,
    devtool: '#eval-source-map',

    entry: './src-docs/main.js',
    output: {
        path: path.join(__dirname, 'docs'),
        filename: 'docs.bundle.js'
    },

    resolveLoader: {
        root: path.join(__dirname, 'node_modules'),
    },

    module: {
        loaders: [{
            test: /\.vue$/,
            loader: 'vue'
        }, {
            test: /\.js$/,
            loader: 'babel',
            exclude: /node_modules/
        }, {
            test: /\.json$/,
            loader: 'json'
        }, {
            test: /\.html$/,
            loader: 'vue-html'
        }, {
            test: /\.(png|jpg|gif|svg)$/,
            loader: 'url',
            query: {
                limit: 10000,
                name: '[name].[ext]?[hash]'
            }
        }, {
            test: /draggabilly|desandro|get\-size|classie|unidragger|unipointer|eventemitter/,
            loader: 'imports?define=>false&this=>window'
        }]
    },

    vue: {
        loaders: {
            css: ExtractTextPlugin.extract('css'), // extract css and stylus files to a single file
            stylus: ExtractTextPlugin.extract('css!stylus')
        },

        autoprefixer: {
            browsers: ['last 2 versions', 'ie > 8', 'Firefox ESR']
        }
    },

    babel: {
        presets: ['es2015', 'stage-2'],
        plugins: ['transform-runtime'],
        comments: false
    },

    plugins: [
        new ExtractTextPlugin('docs.bundle.css')
    ],

    banner: banner
};