text:
package org.powlab.jeye.tests.cond;

public class CondTest10 {

    public boolean test(boolean a, boolean b, boolean c) {
        if (!(a ^ b)) {
            System.out.println("tesT");
            return false;
        }
        return true;
    }

}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Fl. ind. 2:422. 1824

#### Original name
null

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
require File.dirname(__FILE__) + '/../../spec_helper'

module Cucumber
  module Cli
    describe DRbClient do
      before(:each) do
        @args = ['features']
        @error_stream = StringIO.new
        @out_stream = StringIO.new

        @drb_object = mock('DRbObject', :run => true)
        DRbObject.stub!(:new_with_uri).and_return(@drb_object)
      end

      it "starts up a druby service" do
        DRb.should_receive(:start_service).with("druby://localhost:0")
        DRbClient.run(@args, @error_stream, @out_stream)
      end

      it "connects to the DRb server" do
        DRbObject.should_receive(:new_with_uri).with("druby://127.0.0.1:8990")
        DRbClient.run(@args, @error_stream, @out_stream)
      end

      it "runs the fearures on the DRb server" do
        @drb_object.should_receive(:run).with(@args, @error_stream, @out_stream)
        DRbClient.run(@args, @error_stream, @out_stream)
      end

      it "returns raises an error when it can't connect to the server" do
        DRbObject.stub!(:new_with_uri).and_raise(DRb::DRbConnError)
        running { DRbClient.run(@args, @error_stream, @out_stream) }.should raise_error(DRbClientError, "No DRb server is running.")
      end

      it "returns the result from the DRb server call" do
        @drb_object.should_receive(:run).and_return('foo')
        DRbClient.run(@args, @error_stream, @out_stream).should == 'foo'
      end

    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Data;
using System.Windows.Forms;
using WelderCalculator.Views.AddMaterialDatabaseView.AddMaterialDatabasePresenters;

namespace WelderCalculator.Views.AddMaterialDatabaseView
{
    public partial class AddMaterialDatabaseForm : Form, IAdditiveMaterialView
    {
        public AddMaterialDatabasePresenter Presenter { private get; set; }
        public AdditiveMaterialDatabaseAccesibility Accesibility { get; private set; }

        public AddMaterialDatabaseForm(AdditiveMaterialDatabaseAccesibility accesibility)
        {
            Accesibility = accesibility;
            InitializeComponent();

            if (Accesibility == AdditiveMaterialDatabaseAccesibility.Full)
                Presenter = new FullAccesAddMaterialDatabasePresenter(this);
            else
                Presenter = new PartialAccesAddMaterialPresenter(this);

                Presenter.Init();
        }

        public List<string> NormsList
        {
            get { return this.normComboBox.DataSource as List<string>; }
            set { this.normComboBox.DataSource = value; }
        }

        public int SelectedNorm
        {
            get { return this.normComboBox.SelectedIndex; }
            set { this.normComboBox.SelectedIndex = value; }
        }

        public List<string> EquivalentsList
        {
            get { return equivalentTypeComboBox.DataSource as List<string>; }
            set { equivalentTypeComboBox.DataSource = value; }
        }

        public int SelectedEquivalent
        {
            get { return equivalentTypeComboBox.SelectedIndex; }
            set { equivalentTypeComboBox.SelectedIndex = value; }
        }

        #region Checkboxes
        public bool CcheckBox
        {
            get { return this.cCheckBox.Checked; }
            set { this.cCheckBox.Checked = value; }
        }

        public bool SiCheckBox
        {
            get { return this.siCheckBox.Checked; }
            set { this.siCheckBox.Checked = value; }
        }

        public bool MnCheckBox
        {
            get { return this.mnCheckBox.Checked; }
            set { this.mnCheckBox.Checked = value; }
        }

        public bool PcheckBox
        {
            get { return this.pCheckBox.Checked; }
            set { this.pCheckBox.Checked = value; }
        }

        public bool ScheckBox
        {
            get { return this.sCheckBox.Checked; }
            set { this.sCheckBox.Checked = value; }
        }

        public bool NcheckBox
        {
            get { return this.nCheckBox.Checked; }
            set { this.nCheckBox.Checked = value; }
        }

        public bool CrCheckBox
        {
            get { return this.crCheckBox.Checked; }
            set { this.crCheckBox.Checked = value; }
        }

        public bool MoCheckBox
        {
            get { return this.moCheckBox.Checked; }
            set { this.moCheckBox.Checked = value; }
        }

        public bool NbCheckBox
        {
            get { return this.nbCheckBox.Checked; }
            set { this.nbCheckBox.Checked = value; }
        }

        public bool NiCheckBox
        {
            get { return this.niCheckBox.Checked; }
            set { this.niCheckBox.Checked = value; }
        }

        public bool TiCheckBox
        {
            get { return this.tiCheckBox.Checked; }
            set { this.tiCheckBox.Checked = value; }
        }

        public bool CuCheckBox
        {
            get { return this.cuCheckBox.Checked; }
            set { this.cuCheckBox.Checked = value; }
        }

        public bool VCheckBox
        {
            get { return vCheckBox.Checked; }
            set { vCheckBox.Checked = value; }
        }

        public bool MinCheckBox
        {
            get { return this.minCheckBox.Checked; }
            set { this.minCheckBox.Checked = value; }
        }

        public bool MaxCheckBox
        {
            get { return this.maxCheckBox.Checked; }
            set { this.maxCheckBox.Checked = value; }
        }

        public bool RealCheckBox
        {
            get { return this.realCheckBox.Checked; }
            set { this.realCheckBox.Checked = value; }
        }
        #endregion

        public DataTable GridSource
        {
            set { this.materialsDataGridView.DataSource = value; }
        }

        public DataGridView DataGridView
        {
            get { return this.materialsDataGridView; }
        }

        public DataGridViewRow SelectedRow
        {
            get
            {
                if (this.materialsDataGridView.SelectedRows.Count >= 1)
                    return materialsDataGridView.SelectedRows[0];
                else return new DataGridViewRow();
            }
        }

        public double? NiEquivalentTextBox
        {
            get
            {
                string nNiEquivalentTextBox = this.niTextBox.Text;

                if (string.IsNullOrEmpty(nNiEquivalentTextBox))
                    return null;
                return
                    (double)Convert.ChangeType(nNiEquivalentTextBox, typeof(double));
            }
            set { this.niTextBox.Text = value.HasValue ? value.ToString() : "Brak danych"; }
        }

        public double? CrEquivalentTextBox
        {
            get
            {
                string crEquivalentTextBox = this.niTextBox.Text;

                if (string.IsNullOrEmpty(crEquivalentTextBox))
                    return null;
                return
                    (double)Convert.ChangeType(crEquivalentTextBox, typeof(double));
            }
            set { this.crTextBox.Text = value.HasValue ? value.ToString() : "Brak danych"; }
        }

        #region ElementCheckBoxes
        private void cCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("C");
        }
        private void pCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("P");
        }
        private void crCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Cr");
        }
        private void niCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Ni");
        }
        private void siCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Si");
        }
        private void sCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("S");
        }
        private void moCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Mo");
        }
        private void tiCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Ti");
        }
        private void mnCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Mn");
        }
        private void nCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("N");
        }
        private void nbCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Nb");
        }
        private void cuCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("Cu");
        }
        private void vCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            Presenter.OnMaterialCheckBoxChanged("V");
        }
        #endregion

        private void numberCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnViewOptionsCheckBoxChanged("Numer");
        }

        private void minCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnViewOptionsCheckBoxChanged("min");
        }

        private void maxCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnViewOptionsCheckBoxChanged("max");
        }

        private void realCheckBox_CheckedChanged(object sender, System.EventArgs e)
        {
            Presenter.OnViewOptionsCheckBoxChanged("real");
        }

        private void orderElementsButton_Click(object sender, EventArgs e)
        {
            Presenter.OnElementsOrderPropertiesButtonClicked();
            Presenter.Refresh();
        }

        private void addButton_Click(object sender, EventArgs e)
        {
            Presenter.OnAddMaterialButtonClicked();
        }

        private void editButton_Click(object sender, EventArgs e)
        {
            Presenter.OnEditMaterialButtonClicked();
        }

        private void addNewNormButton_Click(object sender, EventArgs e)
        {
            Presenter.OnAddNormButtonClicked();
        }

        private void deleteButton_Click(object sender, EventArgs e)
        {
            Presenter.OnDeleteMaterialButtonClicked();
        }

        private void normComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Presenter.OnNormSelectedIndexChanged();
        }

        private void equivalentTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Presenter.OnEquivalentSelectedIndexChanged();
        }

        private void materialsDataGridView_SelectedRowChanged(object sender, EventArgs e)
        {
            Presenter.OnSelectedDataGridViewRowChanged();
        }

        private void deleteNormButton_Click(object sender, EventArgs e)
        {
            Presenter.OnDeleteNormButtonClicked();
            //Trzeba dodac potwierdzenie usunia normy - za duzo do stracenia
        }

        private void chooseMaterialButton_Click(object sender, EventArgs e)
        {
            Presenter.OnChooseMaterialButtonClicked();
            this.Close();
        }

        public bool ChooseMaterialVisibityButton
        {
            get { return chooseMaterialButton.Visible; }
            set { chooseMaterialButton.Visible = value; }
        }

        public bool ModifyMaterialVisibilityLayoutPanel
        {
            get { return modifyMaterialControlPanel.Visible; }
            set { modifyMaterialControlPanel.Visible = value; }
        }

        public bool AddNormVisibilityButton
        {
            get { return addNewNormButton.Visible; }
            set { addNewNormButton.Visible = value; }
        }

        public bool DeleteNormVisibilityButton
        {
            get { return deleteNormButton.Visible; }
            set { deleteNormButton.Visible = value; }
        }
    }
}


text:
package cct.math;

import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.util.prefs.Preferences;

import javax.swing.JFileChooser;

import cct.GlobalConstants;
import cct.tools.FileFilterImpl;

/**
 *
Title: Jamberoo - Computational Chemistry Toolkit

 *
 *
Description: Collection of Computational Chemistry related code

 *
 *
Copyright: Copyright (c) 2005-2010 Dr. Vladislav Vasilyev

 *
 *
Company: The Australian National University

 *
 * @author Dr. Vladislav Vasilyev
 * @version 1.0
 */
public abstract class VolumeData
    implements GlobalConstants {

  protected String commentLine_1 = null, commentLine_2 = null;

  protected float dataOrigin[] = new float[3];
  protected int numberOfVoxels[] = new int[3];
  protected float axisVectors[][] = new float[3][3];

  protected int nVolumetrics = 1;
  protected int labels[] = null;
  protected double data[][][][] = null;

  protected float minFValue = 0, maxFValue = 0;

  private static final String RAW_FILE_DESCRIPTION = "Raw Volume Data (*.raw)";

  private static String lastPWDKey = "lastPWD";
  private Preferences prefs = Preferences.userNodeForPackage(getClass());
  private File currentWorkingDirectory = null;
  private JFileChooser chooser = null;
  protected FileFilterImpl[] filters = null;

  public VolumeData() {
    filters = new FileFilterImpl[1];

    filters[0] = new FileFilterImpl();
    filters[0].addExtension("raw");
    filters[0].addExtension("RAW");
    filters[0].setDescription(RAW_FILE_DESCRIPTION);
  }

  public javax.swing.filechooser.FileFilter[] getDefaultSaveFileFilters() {
    return filters;
  }

  public abstract void parseVolumetricData(String filename) throws Exception;

  public float[] getDataOrigin() {
    return dataOrigin;
  }

  public int[] getNumberOfVoxels() {
    return numberOfVoxels;
  }

  public float[][] getAxisVectors() {
    return axisVectors;
  }

  public double[][][] getVolumetricData() {
    return data[0];
  }

  public double[][][] getVolumetricData(int n) {
    return data[n];
  }

  public void removeVolumetricData(int n) {

    if (nVolumetrics < 1) {
      System.err.println("removeVolumetricData: nVolumetrics < 1");
      return;
    }

    if (n < 0 || n >= nVolumetrics) {
      System.err.println("removeVolumetricData: n < 0 || n>= nVolumetrics");
      return;
    }

    if (nVolumetrics == 1) {
      data = null;
      nVolumetrics = 0;
      return;
    }

    double[][][][] newData = new double[data.length - 1][][][];
    for (int i = 0, j = 0; i < data.length; i++) {
      if (i != n) {
        newData[j] = data[i];
        ++j;
      }
    }
    --nVolumetrics;

    data = newData;
    newData = null;
  }

  public int countCubes() {
    return nVolumetrics;
  }

  public String getCubeLabel(int n) {
    if (n < 0 || n >= nVolumetrics) {
      System.err.println(this.getClass().getCanonicalName() + " getVolumetricLabel: n<0 || n>=nVolumetrics");
      return null;
    }
    if (labels == null) {
      return "";
    }
    return "MO: " + String.valueOf(labels[n]);
  }

  public String getTitle() {
    return this.commentLine_1;
  }

  public String getCubeDescription() {
    return this.commentLine_2;
  }

  public float getMinFunValue() {
    return minFValue;
  }

  public float getMaxFunValue() {
    return maxFValue;
  }

  public void checkCubeNumber(int n) throws Exception {
    if (nVolumetrics < 1) {
      System.err.println("saveVolumeData: nVolumetrics < 1");
      throw new Exception("saveVolumeData: nVolumetrics < 1");
    }

    if (n < 0 || n >= nVolumetrics) {
      System.err.println("saveVolumeData: n < 0 || n>=nVolumetrics");
      throw new Exception("saveVolumeData: n < 0 || n>=nVolumetrics");
    }
  }

  public void saveVolumeData(int n) throws Exception {

    checkCubeNumber(n);

    if (chooser == null) {
      chooser = new JFileChooser();
      for (int i = 0; i < filters.length; i++) {
        chooser.addChoosableFileFilter(filters[i]);
      }
    }

    chooser.setDialogTitle("Save Volume Data File");
    chooser.setDialogType(JFileChooser.SAVE_DIALOG);

    if (currentWorkingDirectory != null) {
      chooser.setCurrentDirectory(currentWorkingDirectory);
    }
    else {
      String lastPWD = prefs.get(lastPWDKey, "");
      if (lastPWD.length() > 0) {
        currentWorkingDirectory = new File(lastPWD);
        if (currentWorkingDirectory.isDirectory() && currentWorkingDirectory.exists()) {
          chooser.setCurrentDirectory(currentWorkingDirectory);
        }
      }
    }

    int returnVal = JFileChooser.CANCEL_OPTION;

    returnVal = chooser.showSaveDialog(null);

    if (returnVal == JFileChooser.CANCEL_OPTION) {
      return;
    }

    if (returnVal == JFileChooser.APPROVE_OPTION) {

      javax.swing.filechooser.FileFilter selectedFilter = chooser.getFileFilter();
      String fileName = chooser.getSelectedFile().getPath();

      if (selectedFilter.getDescription().equals(RAW_FILE_DESCRIPTION)) {

      }
      else {
        throw new Exception("Unknown volume data file description: " + selectedFilter.getDescription());
      }

      currentWorkingDirectory = chooser.getCurrentDirectory();
      try {
        prefs.put(lastPWDKey, currentWorkingDirectory.getAbsolutePath());
      }
      catch (Exception ex) {
        System.err.println("Cannot save cwd: " + ex.getMessage() + " Ignored...");
      }

      saveVolumeData(n, fileName, selectedFilter.getDescription());
    }
  }

  public void saveVolumeData(int n, String file_name, String format) throws Exception {
    if (format.equals(RAW_FILE_DESCRIPTION)) {

      if (file_name.endsWith(".")) {
        file_name += "raw";
      }
      else if (!file_name.endsWith(".raw") && !file_name.endsWith(".RAW")) {
        file_name += ".raw";
      }

      try {
        FileOutputStream fos = new FileOutputStream(file_name);
        // Wrap the FileOutputStream with a DataOutputStream
        DataOutputStream data_out = new DataOutputStream(fos);
        data_out.writeByte(8); // --- float - 4 bytes per voxel
        data_out.writeInt(numberOfVoxels[0]); // --- NX
        data_out.writeInt(numberOfVoxels[1]); // --- NY
        data_out.writeInt(numberOfVoxels[2]); // --- NZ
        // --- volume data is the complete volumetric data with Z as the fastest varying loop index.
        for (int i = 0; i < numberOfVoxels[0]; i++) {
          for (int j = 0; j < numberOfVoxels[1]; j++) {
            for (int k = 0; k < numberOfVoxels[2]; k++) {
              data_out.writeFloat( (float) data[n][i][j][k]);
            }
          }
        }
        data_out.close();
      }
      catch (Exception ex) {
        throw new Exception("Error saving " + file_name + " : " + ex.getMessage());
      }
    }
    else {
      throw new Exception("Unknown volume data file format: " + format);
    }

  }

  public void getNormalizedHistogram(double[] x, double[] y, int nBins, int n) throws Exception {
    getHistogram(x, y, nBins, n);
    double norm = numberOfVoxels[0] * numberOfVoxels[1] * numberOfVoxels[2];
    for (int i = 0; i < nBins; i++) {
      y[i] /= norm;
    }
  }

  public void getHistogram(double[] x, double[] y, int nBins, int n) throws Exception {
    checkCubeNumber(n);

    // -- Find min & max function values
    double fmin = data[n][0][0][0];
    double fmax = data[n][0][0][0];

    for (int i = 0; i < numberOfVoxels[0]; i++) {
      for (int j = 0; j < numberOfVoxels[1]; j++) {
        for (int k = 0; k < numberOfVoxels[2]; k++) {
          if (fmin > data[n][i][j][k]) {
            fmin = data[n][i][j][k];
          }
          else if (fmax < data[n][i][j][k]) {
            fmax = data[n][i][j][k];
          }
        }
      }
    }

    double width = (fmax - fmin) / nBins;
    for (int i = 0; i < nBins; i++) {
      x[i] = fmin + width * i;
      y[i] = 0;
    }

    for (int i = 0; i < numberOfVoxels[0]; i++) {
      for (int j = 0; j < numberOfVoxels[1]; j++) {
        for (int k = 0; k < numberOfVoxels[2]; k++) {
          int index = (int) ( (data[n][i][j][k] - fmin) / width);
          if (index >= nBins) {
            index = nBins - 1;
          }
          ++y[index];
        }
      }
    }
  }

  public static void main(String[] args) {
    //VolumeData volumedata = new VolumeData();
  }
}


text:
var Script = require('./script');
var ECKey = require('./eckey').ECKey;
var conv = require('./convert');
var util = require('./util');

var BigInteger = require('./jsbn/jsbn');

var BIP32key = require('./bip32');

var Transaction = require('./transaction').Transaction;
var TransactionIn = require('./transaction').TransactionIn;
var TransactionOut = require('./transaction').TransactionOut;

var SecureRandom = require('./jsbn/rng');
var rng = new SecureRandom();

var Wallet = function (seed) {
    if (!(this instanceof Wallet)) { return new Wallet(seed); }

    // Stored in a closure to make accidental serialization less likely
    var keys = [];
    var masterkey = null;
    var me = this;

    // Addresses
    this.addresses = [];

    // Transaction output data
    this.outputs = {};

    // Make a new master key
    this.newMasterKey = function(seed) {
        if (!seed) {
            var seedBytes = new Array(32);
            rng.nextBytes(seedBytes);
            seed = conv.bytesToString(seedBytes)
        }
        masterkey = new BIP32key(seed);
        keys = []
    }
    this.newMasterKey(seed)

    // Add a new address
    this.generateAddress = function() {
        keys.push(masterkey.ckd(keys.length).key)
        this.addresses.push(keys[keys.length-1].getBitcoinAddress().toString())
        return this.addresses[this.addresses.length - 1]
    }

    // Processes a transaction object
    // If "verified" is true, then we trust the transaction as "final"
    this.processTx = function(tx, verified) {
        var txhash = conv.bytesToHex(tx.getHash())
        for (var i = 0; i < tx.outs.length; i++) {
            if (this.addresses.indexOf(tx.outs[i].address.toString()) >= 0) {
                me.outputs[txhash+':'+i] = {
                    output: txhash+':'+i,
                    value: tx.outs[i].value,
                    address: tx.outs[i].address.toString(),
                    timestamp: new Date().getTime() / 1000,
                    pending: true
                }
            }
        }
        for (var i = 0; i < tx.ins.length; i++) {
            var op = tx.ins[i].outpoint
            var o = me.outputs[op.hash+':'+op.index]
            if (o) {
                o.spend = txhash+':'+i
                o.spendpending = true
                o.timestamp = new Date().getTime() / 1000
            }
        }
    }
    // Processes an output from an external source of the form
    // { output: txhash:index, value: integer, address: address }
    // Excellent compatibility with SX and pybitcointools
    this.processOutput = function(o) {
        if (!this.outputs[o.output] || this.outputs[o.output].pending)
             this.outputs[o.output] = o;
    }

    this.processExistingOutputs = function() {
        var t = new Date().getTime() / 1000
        for (var o in this.outputs) {
            if (o.pending && t > o.timestamp + 1200)
                delete this.outputs[o]
            if (o.spendpending && t > o.timestamp + 1200) {
                o.spendpending = false
                o.spend = false
                delete o.timestamp
            }
        }
    }
    var peoInterval = setInterval(this.processExistingOutputs, 10000)

    this.getUtxoToPay = function(value) {
        var h = []
        for (var out in this.outputs) h.push(this.outputs[out])
        var utxo = h.filter(function(x) { return !x.spend });
        var valuecompare = function(a,b) { return a.value > b.value; }
        var high = utxo.filter(function(o) { return o.value >= value; })
                       .sort(valuecompare);
        if (high.length > 0) return [high[0]];
        utxo.sort(valuecompare);
        var totalval = 0;
        for (var i = 0; i < utxo.length; i++) {
            totalval += utxo[i].value;
            if (totalval >= value) return utxo.slice(0,i+1);
        }
        throw ("Not enough money to send funds including transaction fee. Have: "
                     + (totalval / 100000000) + ", needed: " + (value / 100000000));
    }

    this.mkSend = function(to, value, fee) {
        var utxo = this.getUtxoToPay(value + fee)
        var sum = utxo.reduce(function(t,o) { return t + o.value },0),
            remainder = sum - value - fee
        if (value < 5430) throw new Error("Amount below dust threshold!")
        var unspentOuts = 0;
        for (var o in this.outputs) {
            if (!this.outputs[o].spend) unspentOuts += 1
            if (unspentOuts >= 5) return
        }
        var change = this.addresses[this.addresses.length - 1]
        var toOut = { address: to, value: value },
            changeOut = { address: change, value: remainder }
            halfChangeOut = { address: change, value: Math.floor(remainder/2) };

        var outs =
              remainder < 5430  ? [toOut]
            : remainder < 10860 ? [toOut, changeOut]
            : unspentOuts == 5  ? [toOut, changeOut]
            :                     [toOut, halfChangeOut, halfChangeOut]

        var tx = new Bitcoin.Transaction({
            ins: utxo.map(function(x) { return x.output }),
            outs: outs
        })
        this.sign(tx)
        return tx
    }

    this.mkSendToOutputs = function(outputs, changeIndex, fee) {
        var value = outputs.reduce(function(t,o) { return t + o.value },0),
            utxo = this.getUtxoToPay(value + fee),
            sum = utxo.reduce(function(t,p) { return t + o.value },0);
        utxo[changeIndex].value += sum - value - fee;
        var tx = new Bitcoin.Transaction({
            ins: utxo.map(function(x) { return x.output }),
            outs: outputs
        })
        this.sign(tx)
        return tx
    }

    this.sign = function(tx) {
        tx.ins.map(function(inp,i) {
            var inp = inp.outpoint.hash+':'+inp.outpoint.index;
            if (me.outputs[inp]) {
                var address = me.outputs[inp].address,
                    ind = me.addresses.indexOf(address);
                if (ind >= 0) {
                    var key = keys[ind]
                    tx.sign(ind,key)
                }
            }
        })
        return tx;
    }

    this.getMasterKey = function() { return masterkey }

    this.getPrivateKey = function(index) {
        if (typeof index == "string")
            return keys.filter(function(i,k){ return addresses[i] == index })[0]
        else
            return keys[index]
    }

    this.getPrivateKeys = function() { return keys }
};

module.exports = Wallet;


text:
module Box
  # Represents a folder or file stored on Box. Any attributes or actions
  # typical to a Box item can be accessed through this class. The {Item}
  # class contains only methods shared by {Folder} and {File}, and should
  # not be instanciated directly.

  class Item
    # @return [Hash] The hash of info for this item.
    attr_accessor :data

    # @return [Api] The {Api} used by this item.
    attr_accessor :api

    # @return [Folder] The parent of this item.
    attr_accessor :parent

    # Create a new item representing either a file or folder.
    #
    # @param [Api] api The {Api} instance used to generate requests.
    # @param [Folder] parent The {Folder} parent of this item.
    # @param [Hash] info The hash of initial info for this item.
    def initialize(api, parent, info)
      @api = api
      @parent = parent
      @data = Hash.new

      update_info(info) # merges with the info hash, and renames some fields
    end

    # @return [String] The string representation of this item.
    def self.type; raise "Overwrite this method"; end

    # @return [String] The plural string representation of this item.
    def self.types; type + 's'; end

    # TODO: There should be a better way of doing this.

    # (see .type)
    def type; self.class.type; end

    # (see .types)
    def types; self.class.types; end

    # @return [String] The id of this item.
    def id
      # overloads Object#id
      @data['id']
    end

    # Get the info for this item. Uses a cached copy if avaliable,
    # or else it is fetched from the api.
    #
    # @param [Boolean] refresh Does not use the cached copy if true.
    # @return [Item] self
    def info(refresh = false)
      return self if @cached_info and not refresh

      @cached_info = true
      update_info(get_info)

      self
    end

    # Move this item to the destination folder.
    #
    # @param [Folder] destination The new parent folder to use.
    # @return [Item] self
    def move(destination)
      @api.move(type, id, destination.id)

      parent.delete_info(self.types)
      destination.delete_info(self.types)

      @parent = destination

      self
    end

    # Copy this item to the destination folder.
    #
    # @note Copying folders is not currently supported.
    #
    # @param [Folder] destination The parent folder to copy the item to.
    # @return [Item] The new copy of this item.
    def copy(destination)
      @api.copy(type, id, destination.id)

      destination.delete_info(self.types)

      self.class.new(api, destination, @data)
    end

    # Rename this item.
    #
    # @param [String] new_name The new name for the item.
    # @return [Item] self
    def rename(new_name)
      @api.rename(type, id, new_name)

      update_info('name' => new_name)

      self
    end

    # Delete this item and all sub-items.
    #
    # @return [Item] self
    # TODO: Return nil instead
    def delete
      @api.delete(type, id)

      parent.delete_info(self.types)
      @parent = nil

      self
    end

    # Set the description of this item.
    #
    # @param [String] message The description message to use.
    # @return [Item] self
    def description(message)
      @api.set_description(type, id, message)

      self
    end

    # @return [String] The path of this item. This starts with a '/'.
    def path
      "#{ parent.path + '/' if parent }#{ name }"
    end

    # Provides an easy way to access this item's info.
    #
    # @example
    #   item.name # returns @data['name'] or fetches it if not cached
    def method_missing(sym, *args, &block)
      # TODO: Why not symbols?
      # convert to a string
      str = sym.to_s

      # return the value if it already exists
      return @data[str] if @data.key?(str)

      # value didn't exist, so try to update the info
      self.info

      # try returning the value again
      return @data[str] if @data.key?(str)

      # we didn't find a value, so it must be invalid
      # call the normal method_missing function
      super
    end

    # Consider the item cached. This prevents an additional api
    # when we know the item is fully fetched.
    def force_cached_info
      @cached_info = true
    end

    protected

    # Fetches this item's info from the api.
    #
    # @return [Hash] The info for the item.
    def get_info; Hash.new; end

    # Merges in the given info, making sure the fields are uniform.
    # This is done because the api will occasionally return fields like
    # 'file_id', but we want just 'id'.
    #
    # @param [Hash] info A hash to be merged this item's info
    def update_info(info)
      ninfo = Hash.new

      # some fields are named 'file_id' or 'id' inconsistently, so trim the type off
      info.each do |name, value|
        if name.to_s =~ /^#{ type }_(.+)$/; ninfo[$1] = value
        else; ninfo[name.to_s] = value; end
      end

      @data.merge!(ninfo) # merge in the updated info
    end

    # Invalidates and deletes the cache for a specific field. This forces
    # the item to lazy-load this field if it is requested.
    #
    # @param [String] field The field to delete.
    def delete_info(field)
      @cached_info = false
      @data.delete(field)
    end

    # Invalidates and deletes the entire cache. This forces all info to be
    # lazy-loaded if requested.
    def clear_info
      @cached_info = false
      @data.clear
    end
  end
end


text:
NPM INSTALL

  inquirer.prompt([{
      'type': 'confirm'
    , 'name': 'ok'
    , 'default': true
    , 'message': wordwrap(4, 80)(
      "We're about to populate this directory with some code for you to " +
      "use for your answers. If they've already been created then don't worry, " +
      "they won't be replaced. Continue?"
    ).replace(/^\s+/, '')
  }], function(result) {
    if (!result.ok) return process.exit(1)
    console.error()

    exercises.forEach(createExercise)
    if (!counter) return done && done()
  })


text:
/*jshint jasmine: true */
'use strict';

function Ref(ref) {
    this.ref = ref;
}

Ref.prototype.get = function(object) {
    var chain = this.ref.split('.');
    for (var i=0; i<chain.length; i++) {
        var key = chain[i];
        object = object[key];
        if (!object) {
            return undefined;
        }
    }
    return object;
};

// TODO: refactor: implement set using get(path[:-1])
Ref.prototype.set = function(object, value) {
    var chain = this.ref.split('.');
    var key;
    for (var i=0; i<chain.length-1; i++) {
        key = chain[i];
        object = object[key];
        if (!object) {
            throw this.ref + ' doesn\'t exist in ' + object;
        }
    }
    key = chain[chain.length - 1];
    object[key] = value;
};

Ref.prototype.__isRef = true;

module.exports = Ref;


text:
using GenFx.Validation;
using System;
using Xunit;

namespace GenFx.Components.Tests
{
    /// <summary>
    /// Contains unit tests for the <see cref="BooleanValidator"/> class.
    /// </summary>
    public class BooleanValidatorTest
    {
        /// <summary>
        /// Tests that the ctor initializes the state correctly.
        /// </summary>
        [Fact]
        public void BooleanValidator_Ctor()
        {
            BooleanValidator validator = new BooleanValidator(false);
            Assert.False(validator.RequiredValue);

            validator = new BooleanValidator(true);
            Assert.True(validator.RequiredValue);
        }

        /// <summary>
        /// Tests that the <see cref="BooleanValidator.IsValid"/> method works correctly.
        /// </summary>
        [Fact]
        public void BooleanValidator_IsValid()
        {
            BooleanValidator validator = new BooleanValidator(false);
            bool result = validator.IsValid(true, "test", this, out string errorMessage);
            Assert.False(result);
            Assert.NotNull(errorMessage);

            result = validator.IsValid("false", "test", this, out errorMessage);
            Assert.False(result);
            Assert.NotNull(errorMessage);

            result = validator.IsValid(false, "test", this, out errorMessage);
            Assert.True(result);
            Assert.Null(errorMessage);
        }

        /// <summary>
        /// Tests that an exception is thrown when passing a null or empty property name to <see cref="BooleanValidator.IsValid"/>.
        /// </summary>
        [Fact]
        public void BooleanValidator_IsValid_NullPropertyName()
        {
            BooleanValidator validator = new BooleanValidator(false);
            string errorMessage;
            Assert.Throws<ArgumentException>(() => validator.IsValid(true, null, this, out errorMessage));
            Assert.Throws<ArgumentException>(() => validator.IsValid(true, String.Empty, this, out errorMessage));
        }
    }
}


text:
set -e

# disabled until xctool possibly becomes outdated again
#brew update
#brew upgrade xctool


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

namespace WinAPI {
  /// <summary>
  /// Defines Window Messages codes
  /// </summary>
  /// <remarks>
  /// Window Messages codes are defined in the WinUser.h file (Platform SDK)
  /// </remarks>
  public enum MessageCodes:int {
    /// <summary>
    /// The WM_RBUTTONDOWN message is posted when the user presses the right mouse button
    /// </summary>
    WM_RBUTTONDOWN = 0x0204,
    /// <summary>
    /// The WM_RBUTTONUP message is posted when the user releases the right mouse button
    /// </summary>
    WM_RBUTTONUP = 0x0205,

    /// <summary>
    /// The WM_MOUSEMOVE message is posted to a window when the cursor moves.
    /// </summary>
    WM_MOUSEMOVE = 0x0200,

    HC_ACTION = 0
  }
}


text:
class MD2::Frame
  # Float[3] containing X, Y, Z scale values
  attr_reader :scale

  # Float[3] containing X, Y, Z translations
  attr_reader :translation

  # The name of this frame (string)
  attr_reader :name

  # The vertices for this frame.
  attr_reader :vertices

  # The indices of the normal vectors.
  attr_reader :normal_indices

  def reduce
    {
      :name => name,
      :translation => @translation,
      :scale => @scale,
      :vertices => packed_vertices,
      :normal_indices => normal_indices.flatten
    }
  end

  def initialize(frame_data)
    @scale = []
    @translation = []
    @vertices = []
    @normal_indices = []

    # 3 floats (scale), 3 floats (transl), 16 bytes (name), and variable num of unsigned chars (vertices)
    frame_data = frame_data.unpack("f3f3a16C*")
    3.times { @scale << frame_data.shift }
    3.times { @translation << frame_data.shift }
    @name = frame_data.shift.strip
    while !frame_data.empty?
      packed_vertex = MD2::Vertex.new(frame_data.shift, frame_data.shift, frame_data.shift)
      @vertices << unpack_vertex_data(packed_vertex)
      @normal_indices << frame_data.shift
    end
  end

  private
  def packed_vertices
    vertices.collect do |vert|
      [ ((vert[0] - @translation[0]) / @scale[0]).to_i,
        ((vert[1] - @translation[1]) / @scale[1]).to_i,
        ((vert[2] - @translation[2]) / @scale[2]).to_i ]
    end.flatten
  end

  def unpack_vertex_data(packed_vertex)
    3.times do |i|
      packed_vertex[i] = (packed_vertex[i] * @scale[i]) + @translation[i]
    end

    packed_vertex
  end
end


text:
module Api
  module V1
    class AudiencesController < Api::V1::FilterCriteriaController
      api :GET, "/v1/audiences", "List audiences"
      def index
        @criteria = Audience.exposable_via_api
      end
    end
  end
end


text:
CSS Layout (divs, display states, floats)
-
http://www.w3.org/TR/CSS2/visuren.html#display-prop
http://www.w3.org/TR/CSS2/box.html
http://learnlayout.com/
http://learn.shayhowe.com/
http://meyerweb.com/eric/thoughts/2004/07/17/floats-dont-suck-if-you-use-them-right/
http://coding.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/
http://coding.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/

General CSS
-
http://coding.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/
http://coding.smashingmagazine.com/2009/08/03/mastering-css-styling-design-elements/
http://coding.smashingmagazine.com/2009/10/26/modern-css-layouts-the-essential-characteristics/
http://coding.smashingmagazine.com/2010/05/06/modern-css-layouts-part-2-the-essential-techniques/

Accessibility
-
http://css-tricks.com/navigation-in-lists-to-be-or-not-to-be/
http://a11yproject.com/

Collapsing Margin
-
http://www.w3.org/TR/CSS21/box.html#collapsing-margins
http://www.w3.org/TR/CSS21/box.html#collapsing-margins
http://stackoverflow.com/questions/3069921/what-is-the-point-of-css-collapsing-margins
http://reference.sitepoint.com/css/collapsingmargins

CSS Multiple Classes and IDs
-
http://css-tricks.com/multiple-class-id-selectors/

Naming Semantics
-
http://2002-2012.mattwilcox.net/archive/entry/id/1058/
http://learn.shayhowe.com/html-css/elements-semantics
http://oli.jp/2011/ids/
http://csswizardry.com/2012/05/keep-your-css-selectors-short/
http://csswizardry.com/2011/09/writing-efficient-css-selectors/

Specificity
-
http://coding.smashingmagazine.com/2010/04/07/css-specificity-and-inheritance/
http://css-tricks.com/specifics-on-css-specificity/
http://coding.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/
http://www.stuffandnonsense.co.uk/archives/css_specificity_wars.html

CSS Style Guides
-
http://css-tricks.com/css-style-guides/
http://warpspire.com/posts/kss/
https://github.com/necolas/idiomatic-css
http://csswizardry.com/2012/04/my-html-css-coding-style/
http://coding.smashingmagazine.com/2008/05/02/improving-code-readability-with-css-styleguides/

SASS, SMACSS, OOCSS
-
http://smacss.com
http://sass-lang.com
http://alistapart.com/article/getting-started-with-sass
https://github.com/stubbornella/oocss/wiki
http://coding.smashingmagazine.com/2011/12/12/an-introduction-to-object-oriented-css-oocss/
http://ianstormtaylor.com/oocss-plus-sass-is-the-best-way-to-css/
http://www.lukew.com/ff/entry.asp?1379

Other CSS Stuff
-
http://css-tricks.com/
http://alistapart.com/article/fluidgrids
http://coding.smashingmagazine.com/2009/09/22/complete-guide-to-css-font-stacks/
http://coding.smashingmagazine.com/2013/02/14/setting-weights-and-styles-at-font-face-declaration/
http://csswizardry.com/2012/02/pragmatic-practical-font-sizing-in-css/
http://coding.smashingmagazine.com/2012/10/04/the-code-side-of-color/
http://coding.smashingmagazine.com/2011/09/19/css3-flexible-box-layout-explained/
http://coding.smashingmagazine.com/2011/07/13/learning-to-use-the-before-and-after-pseudo-elements-in-css/
http://coding.smashingmagazine.com/2009/09/15/the-z-index-css-property-a-comprehensive-look/
http://coding.smashingmagazine.com/2009/09/02/backgrounds-in-css-everything-you-need-to-know/
http://coding.smashingmagazine.com/2009/07/27/the-definitive-guide-to-using-negative-margins/
http://csswizardry.com/2011/09/do-designers-need-to-code/
http://csswizardry.com/2011/08/more-logo-markup-tips/


text:
package com.gemstone.gemfire.internal.cache.partitioned.rebalance;

import java.util.HashMap;
import java.util.Map;

import org.apache.logging.log4j.Logger;

import com.gemstone.gemfire.internal.cache.partitioned.rebalance.PartitionedRegionLoadModel.BucketRollup;
import com.gemstone.gemfire.internal.cache.partitioned.rebalance.PartitionedRegionLoadModel.Member;
import com.gemstone.gemfire.internal.cache.partitioned.rebalance.PartitionedRegionLoadModel.Move;
import com.gemstone.gemfire.internal.logging.LogService;

/**
 * A director to create redundant copies for buckets in the correct place
 * for a fixed partitioned region. This is most commonly used as part
 * of the FPRDirector.
 *
 */

public class SatisfyRedundancyFPR extends RebalanceDirectorAdapter {

  private static final Logger logger = LogService.getLogger();

  private PartitionedRegionLoadModel model;

  @Override
  public void initialize(PartitionedRegionLoadModel model) {
    this.model = model;

  }

  @Override
  public void membershipChanged(PartitionedRegionLoadModel model) {
    initialize(model);

  }

  @Override
  public boolean nextStep() {
    createFPRBucketsForThisNode();
    return false;
  }

  public void createFPRBucketsForThisNode() {
    final Map<BucketRollup,Move> moves = new HashMap<BucketRollup,Move>();

    for (BucketRollup bucket : model.getLowRedundancyBuckets()) {
      Move move = model.findBestTargetForFPR(bucket, true);

      if (move == null
          && !model.enforceUniqueZones()) {
        move = model.findBestTargetForFPR(bucket, false);
      }

      if (move != null) {
        moves.put(bucket, move);
      } else {
        if (logger.isDebugEnabled()) {
          logger.debug("Skipping low redundancy bucket {} because no member will accept it", bucket);
        }
      }
    }
    // TODO: This can be done in a thread pool to speed things up as all buckets
    // are different, there will not be any contention for lock
    for (Map.Entry<BucketRollup, Move> bucketMove : moves.entrySet()) {
      BucketRollup bucket = bucketMove.getKey();
      Move move = bucketMove.getValue();
      Member targetMember = move.getTarget();

      model.createRedundantBucket(bucket, targetMember);
    }
  }
}


text:
module Spree
  module API
    class Client
      module Zones
        def zones(options={})
          get('zones', options)['zones']
        end

        def zone(id, options={})
          get("zones/#{id}", options)
        end

        def new_zone(options={})
          get("zones/#{id}/new", options)
        end

        def create_zone(options={})
          post("zones", options)
        end

        def update_zone(id, options={})
          put("zones/#{id}", options)
        end

        def delete_zone(id, options={})
          delete("zones/#{id}", options)
        end
      end
    end
  end
end


text:
typedef enum : NSUInteger {
    LEFT,
    RIGHT,
    STATUS_BAR
} TYPE;

@interface ASFPSLabel : UILabel

@end

@interface ASFPSManager : NSObject

+ (ASFPSManager *)sharedInstance;

- (void)show:(UIView *)superView position:(TYPE)type;

- (void)hidden;

@end


text:
#ifndef _XPLMGraphics_h_
#define _XPLMGraphics_h_

/*
 * Graphics routines for X-Plane and OpenGL.
 *
 * A few notes on coordinate systems:
 *
 * X-Plane uses three kinds of coordinates.  Global coordinates are specified
 * as latitude, longitude and elevation.  This coordinate system never changes
 * but is not very precise.
 *
 * OpenGL (or 'local') coordinates are cartesian and shift with the plane.
 * They offer more precision and are used for 3-d OpenGL drawing.  The X axis
 * is aligned east-west with positive X meaning east.  The Y axis is aligned
 * straight up and down at the point 0,0,0 (but since the earth is round it is
 * not truly straight up and down at other points).  The Z axis is aligned
 * north-south at 0, 0, 0 with positive Z pointing south (but since the earth
 * is round it isn't exactly north-south as you move east or west of 0, 0, 0).
 * One unit is one meter and the point 0,0,0 is on the surface of the  earth
 * at sea level for some latitude and longitude picked by the sim such that
 * the  user's aircraft is reasonably nearby.
 *
 * Cockpit coordinates are 2d, with the X axis horizontal and the Y axis
 * vertical. The point 0,0 is the bottom left and 1024,768 is the upper right
 * of the screen. This is true no matter what resolution the user's monitor is
 * in; when running in higher resolution, graphics will be scaled.
 *
 * Use X-Plane's routines to convert between global and local coordinates.  Do
 * not attempt to do this conversion yourself; the precise 'roundness' of
 * X-Plane's  physics model may not match your own, and (to make things
 * weirder) the user can potentially customize the physics of the current
 * planet.
 *
 */

#include "XPLMDefs.h"

#ifdef __cplusplus
extern "C" {
#endif

/***************************************************************************
 * X-PLANE GRAPHICS
 ***************************************************************************/
/*
 * These routines allow you to use OpenGL with X-Plane.
 *
 */

/*
 * XPLMTextureID
 *
 * XPLM Texture IDs name well-known textures in the sim for you to use. This
 * allows you to recycle textures from X-Plane, saving VRAM.
 *
 */
enum {
     /* The bitmap that contains window outlines, button outlines, fonts, etc.      */
     xplm_Tex_GeneralInterface                = 0

     /* The exterior paint for the user's aircraft (daytime).                       */
    ,xplm_Tex_AircraftPaint                   = 1

     /* The exterior light map for the user's aircraft.                             */
    ,xplm_Tex_AircraftLiteMap                 = 2

};
typedef int XPLMTextureID;

/*
 * XPLMSetGraphicsState
 *
 * XPLMSetGraphicsState changes OpenGL's graphics state in a number of ways:
 *
 * inEnableFog - enables or disables fog, equivalent to: glEnable(GL_FOG);
 *
 * inNumberTexUnits - enables or disables a number of multitexturing units. If
 * the number is 0, 2d texturing is disabled entirely, as in
 * glDisable(GL_TEXTURE_2D);  Otherwise, 2d texturing is enabled, and  a
 * number of multitexturing units are enabled sequentially, starting  with
 * unit 0, e.g. glActiveTextureARB(GL_TEXTURE0_ARB);  glEnable
 * (GL_TEXTURE_2D);
 *
 * inEnableLighting - enables or disables OpenGL lighting, e.g.
 * glEnable(GL_LIGHTING); glEnable(GL_LIGHT0);
 *
 * inEnableAlphaTesting - enables or disables the alpha test per pixel, e.g.
 * glEnable(GL_ALPHA_TEST);
 *
 * inEnableAlphaBlending - enables or disables alpha blending per pixel, e.g.
 * glEnable(GL_BLEND);
 *
 * inEnableDepthTesting - enables per pixel depth testing, as in
 * glEnable(GL_DEPTH_TEST);
 *
 * inEnableDepthWriting - enables writing back of depth information to the
 * depth bufffer, as in glDepthMask(GL_TRUE);
 *
 * The purpose of this function is to change OpenGL state while keeping
 * X-Plane aware of the state changes; this keeps X-Plane from getting
 * surprised by OGL state changes, and prevents X-Plane and plug-ins from
 * having to set all state before all draws; XPLMSetGraphicsState internally
 * skips calls to change state that is already properly enabled.
 *
 * X-Plane does not have a 'default' OGL state to plug-ins; plug-ins should
 * totally set OGL state before drawing.  Use XPLMSetGraphicsState instead of
 * any of the above OpenGL calls.
 *
 * WARNING: Any routine that performs drawing (e.g. XPLMDrawString or widget
 * code) may change X-Plane's state.  Always set state before drawing after
 * unknown code has executed.
 *
 */
XPLM_API void                 XPLMSetGraphicsState(
                                   int                  inEnableFog,
                                   int                  inNumberTexUnits,
                                   int                  inEnableLighting,
                                   int                  inEnableAlphaTesting,
                                   int                  inEnableAlphaBlending,
                                   int                  inEnableDepthTesting,
                                   int                  inEnableDepthWriting);

/*
 * XPLMBindTexture2d
 *
 * XPLMBindTexture2d changes what texture is bound to the 2d texturing target.
 * This routine caches the current 2d texture across all texturing units in
 * the sim and plug-ins, preventing extraneous binding.  For example, consider
 * several plug-ins running in series; if they all use the 'general interface'
 * bitmap to do UI, calling this function will skip the rebinding of the
 * general interface texture on all but the first plug-in, which can provide
 * better frame rate son some graphics cards.
 *
 * inTextureID is the ID of the texture object to bind; inTextureUnit is a
 * zero-based  texture unit (e.g. 0 for the first one), up to a maximum of 4
 * units.  (This number may increase in future versions of x-plane.)
 *
 * Use this routine instead of glBindTexture(GL_TEXTURE_2D, ....);
 *
 */
XPLM_API void                 XPLMBindTexture2d(
                                   int                  inTextureNum,
                                   int                  inTextureUnit);

/*
 * XPLMGenerateTextureNumbers
 *
 * This routine generates unused texture numbers that a plug-in can use to
 * safely bind textures. Use this routine instead of glGenTextures;
 * glGenTextures will allocate texture numbers in ranges that X-Plane reserves
 * for its own use but does not always use; for example, it might provide an
 * ID within the range of textures reserved for terrain...loading a new .env
 * file as the plane flies might then cause X-Plane to use this texture ID.
 * X-Plane will then  overwrite the plug-ins texture.  This routine returns
 * texture IDs that are out of X-Plane's usage range.
 *
 */
XPLM_API void                 XPLMGenerateTextureNumbers(
                                   int *                outTextureIDs,
                                   int                  inCount);

/*
 * XPLMGetTexture
 *
 * XPLMGetTexture returns the OpenGL texture enumeration of an X-Plane texture
 * based on a  generic identifying code.  For example, you can get the texture
 * for X-Plane's UI bitmaps.  This allows you to build new gauges that take
 * advantage of x-plane's textures, for smooth artwork integration and also
 * saving texture  memory.  Note that the texture might not be loaded yet,
 * depending on what the  plane's panel contains.
 *
 * OPEN ISSUE: We really need a way to make sure X-Plane loads this texture if
 * it isn't around, or at least a way to find out whether it is loaded or not.
 *
 */
XPLM_API int                  XPLMGetTexture(
                                   XPLMTextureID        inTexture);

/*
 * XPLMWorldToLocal
 *
 * This routine translates coordinates from latitude, longitude, and altitude
 * to local scene coordinates. Latitude and longitude are in decimal degrees,
 * and altitude is in meters MSL (mean sea level).  The XYZ coordinates are in
 * meters in the local OpenGL coordinate system.
 *
 */
XPLM_API void                 XPLMWorldToLocal(
                                   double               inLatitude,
                                   double               inLongitude,
                                   double               inAltitude,
                                   double *             outX,
                                   double *             outY,
                                   double *             outZ);

/*
 * XPLMLocalToWorld
 *
 * This routine translates a local coordinate triplet back into latitude,
 * longitude, and altitude.  Latitude and longitude are in decimal degrees,
 * and altitude is in meters MSL (mean sea level).  The XYZ coordinates are in
 * meters in the local OpenGL coordinate system.
 *
 * NOTE: world coordinates are less precise than local coordinates; you should
 * try to avoid round tripping from local to world and back.
 *
 */
XPLM_API void                 XPLMLocalToWorld(
                                   double               inX,
                                   double               inY,
                                   double               inZ,
                                   double *             outLatitude,
                                   double *             outLongitude,
                                   double *             outAltitude);

/*
 * XPLMDrawTranslucentDarkBox
 *
 * This routine draws a translucent dark box, partially obscuring parts of the
 * screen but making text easy to read.  This is the same graphics primitive
 * used by X-Plane to show text files and ATC info.
 *
 */
XPLM_API void                 XPLMDrawTranslucentDarkBox(
                                   int                  inLeft,
                                   int                  inTop,
                                   int                  inRight,
                                   int                  inBottom);

/***************************************************************************
 * X-PLANE TEXT
 ***************************************************************************/
/*
 *
 *
 */

/*
 * XPLMFontID
 *
 * X-Plane features some fixed-character fonts.  Each font may have its own
 * metrics.
 *
 * WARNING: Some of these fonts are no longer supported or may have changed
 * geometries. For maximum copmatibility, see the comments below.
 *
 * Note: X-Plane 7 supports proportional-spaced fonts.  Since no measuring
 * routine is available yet, the SDK will normally draw using a fixed-width
 * font.  You can use a dataref to enable proportional font drawing on XP7 if
 * you want to.
 *
 */
enum {
     /* Mono-spaced font for user interface.  Available in all versions of the SDK. */
     xplmFont_Basic                           = 0

     /* Deprecated, do not use.                                                     */
    ,xplmFont_Menus                           = 1

     /* Deprecated, do not use.                                                     */
    ,xplmFont_Metal                           = 2

     /* Deprecated, do not use.                                                     */
    ,xplmFont_Led                             = 3

     /* Deprecated, do not use.                                                     */
    ,xplmFont_LedWide                         = 4

     /* Deprecated, do not use.                                                     */
    ,xplmFont_PanelHUD                        = 5

     /* Deprecated, do not use.                                                     */
    ,xplmFont_PanelEFIS                       = 6

     /* Deprecated, do not use.                                                     */
    ,xplmFont_PanelGPS                        = 7

     /* Deprecated, do not use.                                                     */
    ,xplmFont_RadiosGA                        = 8

     /* Deprecated, do not use.                                                     */
    ,xplmFont_RadiosBC                        = 9

     /* Deprecated, do not use.                                                     */
    ,xplmFont_RadiosHM                        = 10

     /* Deprecated, do not use.                                                     */
    ,xplmFont_RadiosGANarrow                  = 11

     /* Deprecated, do not use.                                                     */
    ,xplmFont_RadiosBCNarrow                  = 12

     /* Deprecated, do not use.                                                     */
    ,xplmFont_RadiosHMNarrow                  = 13

     /* Deprecated, do not use.                                                     */
    ,xplmFont_Timer                           = 14

     /* Deprecated, do not use.                                                     */
    ,xplmFont_FullRound                       = 15

     /* Deprecated, do not use.                                                     */
    ,xplmFont_SmallRound                      = 16

     /* Deprecated, do not use.                                                     */
    ,xplmFont_Menus_Localized                 = 17

#if defined(XPLM200)
     /* Proportional UI font.                                                       */
    ,xplmFont_Proportional                    = 18

#endif /* XPLM200 */

};
typedef int XPLMFontID;

/*
 * XPLMDrawString
 *
 * This routine draws a NULL termianted string in a given font.  Pass in the
 * lower left pixel that the character is to be drawn onto.  Also pass the
 * character and font ID. This function returns the x offset plus the width of
 * all drawn characters. The color to draw in is specified as a pointer to an
 * array of three floating point colors, representing RGB intensities from 0.0
 * to 1.0.
 *
 */
XPLM_API void                 XPLMDrawString(
                                   float *              inColorRGB,
                                   int                  inXOffset,
                                   int                  inYOffset,
                                   char *               inChar,
                                   int *                inWordWrapWidth,    /* Can be NULL */
                                   XPLMFontID           inFontID);

/*
 * XPLMDrawNumber
 *
 * This routine draws a number similar to the digit editing fields in
 * PlaneMaker and data output display in X-Plane.  Pass in a color, a
 * position, a floating point value, and formatting info.  Specify how many
 * integer and how many decimal digits to show and  whether to show a sign, as
 * well as a character set. This routine returns the xOffset plus width of the
 * string drawn.
 *
 */
XPLM_API void                 XPLMDrawNumber(
                                   float *              inColorRGB,
                                   int                  inXOffset,
                                   int                  inYOffset,
                                   double               inValue,
                                   int                  inDigits,
                                   int                  inDecimals,
                                   int                  inShowSign,
                                   XPLMFontID           inFontID);

/*
 * XPLMGetFontDimensions
 *
 * This routine returns the width and height of a character in a given font.
 * It also tells you if the font only supports numeric digits.  Pass NULL if
 * you don't need a given field.  Note that for a proportional font the width
 * will be an arbitrary, hopefully average width.
 *
 */
XPLM_API void                 XPLMGetFontDimensions(
                                   XPLMFontID           inFontID,
                                   int *                outCharWidth,    /* Can be NULL */
                                   int *                outCharHeight,    /* Can be NULL */
                                   int *                outDigitsOnly);    /* Can be NULL */

#if defined(XPLM200)
/*
 * XPLMMeasureString
 *
 * This routine returns the width in pixels of a string using a given font.
 * The string is passed as a pointer plus length (and does not need to be null
 * terminated); this is used to allow for measuring substrings. The return
 * value is floating point; it is possible that future font drawing may allow
 * for fractional pixels.
 *
 */
XPLM_API float                XPLMMeasureString(
                                   XPLMFontID           inFontID,
                                   const char *         inChar,
                                   int                  inNumChars);
#endif /* XPLM200 */

#ifdef __cplusplus
}
#endif

#endif


text:
package com.github.dynamicextensionsalfresco.webscripts;

import static org.mockito.Mockito.*;
import com.github.dynamicextensionsalfresco.webscripts.annotations.Attribute;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Integration test for {@link Attribute} handling.
 *
 * @author Laurens Fridael
 *
 */
public class CommandTest extends AbstractWebScriptAnnotationsTest {

	@Autowired
	private CommandHandler handler;

	@Test
	public void testHandleAttribute() {
		handleGet("/handleCommand", new MockWebScriptRequest().param("firstName", "John").param("lastName", "Smith"));
		verify(handler).handleCommand(eq(new Person("John", "Smith")));
	}
}


text:
/** @namespace lsn.layout */
ECMAScript.Extend('lsn.layout', function (ecma) {

  var CArea = ecma.lsn.layout.Area;

  /**
   * @class Layout
   */

  this.Layout = function (opts) {
    CArea.apply(this, [0, null, 1, opts]);
  };

  var Layout =
  this.Layout.prototype = ecma.lang.createPrototype(
    CArea
  );

  Layout.getRuleRegion = function () {
    return this.getBoundingBox();
  };

  Layout.setRegion = function (region) {
    this.region = this.cloneRegion(region);
    this.region.top += this.gap.top;
    this.region.left += this.gap.left;
    this.region.width -= this.gap.width;
    this.region.height -= this.gap.height;
    this.updateRule();
    return this.getRegion();
  };

});


text:
/*
 * Knetik Platform API Documentation latest
 * This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.
 *
 * OpenAPI spec version: latest
 * Contact: support@knetik.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package com.knetikcloud.model;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.knetikcloud.model.ActionVariableResource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * ActionResource
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-03-14T12:03:43.231-04:00")
public class ActionResource {
  /**
   * The category the action is in. All customer specific actions are in the 'custom' category
   */
  public enum CategoryEnum {
    ACHIEVEMENT("achievement"),

    BEHAVIOR("behavior"),

    COMMENT("comment"),

    DISPOSITION("disposition"),

    DEVICE("device"),

    ENTITLEMENT("entitlement"),

    FRIENDS("friends"),

    FULFILLMENT("fulfillment"),

    GAMIFICATION("gamification"),

    INVENTORY("inventory"),

    INVOICE("invoice"),

    MEDIA("media"),

    SCHEDULER("scheduler"),

    STORE("store"),

    SUBSCRIPTION("subscription"),

    USER("user"),

    WALLET("wallet"),

    CUSTOM("custom"),

    CHALLENGE("challenge"),

    ACTIVITY("activity"),

    CAMPAIGN("campaign"),

    EVENT("event");

    private String value;

    CategoryEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static CategoryEnum fromValue(String text) {
      for (CategoryEnum b : CategoryEnum.values()) {
        if (String.valueOf(b.value).equals(text)) {
          return b;
        }
      }
      return null;
    }
  }

  @JsonProperty("category")
  private CategoryEnum category = null;

  @JsonProperty("description")
  private String description = null;

  @JsonProperty("name")
  private String name = null;

  @JsonProperty("tags")
  private List<String> tags = null;

  @JsonProperty("variables")
  private List<ActionVariableResource> variables = new ArrayList<ActionVariableResource>();

  public ActionResource category(CategoryEnum category) {
    this.category = category;
    return this;
  }

   /**
   * The category the action is in. All customer specific actions are in the 'custom' category
   * @return category
  **/
  @ApiModelProperty(value = "The category the action is in. All customer specific actions are in the 'custom' category")
  public CategoryEnum getCategory() {
    return category;
  }

  public void setCategory(CategoryEnum category) {
    this.category = category;
  }

  public ActionResource description(String description) {
    this.description = description;
    return this;
  }

   /**
   * The description of the action
   * @return description
  **/
  @ApiModelProperty(required = true, value = "The description of the action")
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public ActionResource name(String name) {
    this.name = name;
    return this;
  }

   /**
   * The name of the action. Used as the unique id for reference
   * @return name
  **/
  @ApiModelProperty(required = true, value = "The name of the action. Used as the unique id for reference")
  public String getName() {
    return name;
  }

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

  public ActionResource tags(List<String> tags) {
    this.tags = tags;
    return this;
  }

  public ActionResource addTagsItem(String tagsItem) {
    if (this.tags == null) {
      this.tags = new ArrayList<String>();
    }
    this.tags.add(tagsItem);
    return this;
  }

   /**
   * A list of tags for searching
   * @return tags
  **/
  @ApiModelProperty(value = "A list of tags for searching")
  public List<String> getTags() {
    return tags;
  }

  public void setTags(List<String> tags) {
    this.tags = tags;
  }

  public ActionResource variables(List<ActionVariableResource> variables) {
    this.variables = variables;
    return this;
  }

  public ActionResource addVariablesItem(ActionVariableResource variablesItem) {
    this.variables.add(variablesItem);
    return this;
  }

   /**
   * The variables required for the action
   * @return variables
  **/
  @ApiModelProperty(required = true, value = "The variables required for the action")
  public List<ActionVariableResource> getVariables() {
    return variables;
  }

  public void setVariables(List<ActionVariableResource> variables) {
    this.variables = variables;
  }

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ActionResource actionResource = (ActionResource) o;
    return Objects.equals(this.category, actionResource.category) &&
        Objects.equals(this.description, actionResource.description) &&
        Objects.equals(this.name, actionResource.name) &&
        Objects.equals(this.tags, actionResource.tags) &&
        Objects.equals(this.variables, actionResource.variables);
  }

  @Override
  public int hashCode() {
    return Objects.hash(category, description, name, tags, variables);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ActionResource {\n");

    sb.append("    category: ").append(toIndentedString(category)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    tags: ").append(toIndentedString(tags)).append("\n");
    sb.append("    variables: ").append(toIndentedString(variables)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}


text:
<?xml version="1.0" encoding="UTF-8"?>

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
    <screen name="CreatePartyNotification">

            <actions>
                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="title" value="${uiLabelMap.PartyNotificationMailCreate}"/>
            </actions>
            <widgets>
                <platform-specific></platform-specific>
            </widgets>

    </screen>
    <screen name="ChangePersonalInfoNotification">

            <actions>
                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="title" value="${uiLabelMap.PartyNotificationMailChange}"/>
            </actions>
            <widgets>
                <platform-specific></platform-specific>
            </widgets>

    </screen>
    <screen name="VerifyEmailAddressNotification">

            <actions>
                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="title" value="${uiLabelMap.PartyNotificationMailVerification}"/>
            </actions>
            <widgets>
                <platform-specific></platform-specific>
            </widgets>

    </screen>
    <screen name="AccountActivatedNotification">

            <actions>
                <property-map resource="PartyUiLabels" map-name="uiLabelMap" global="true"/>
                <set field="title" value="${uiLabelMap.PartyNotificationMailActivated}"/>
            </actions>
            <widgets>
                <platform-specific></platform-specific>
            </widgets>

    </screen>
</screens>


text:
package com.github.cxfplus.com.sun.xml.bind.v2.schemagen.xmlschema;

import javax.xml.namespace.QName;
import com.github.cxfplus.com.sun.xml.txw2.TypedXmlWriter;
import com.github.cxfplus.com.sun.xml.txw2.annotation.XmlAttribute;
import com.github.cxfplus.com.sun.xml.txw2.annotation.XmlElement;

@XmlElement("attribute")
public interface LocalAttribute
    extends Annotated, AttributeType, FixedOrDefault, TypedXmlWriter
{

    @XmlAttribute
    public LocalAttribute form(String value);

    @XmlAttribute
    public LocalAttribute name(String value);

    @XmlAttribute
    public LocalAttribute ref(QName value);

    @XmlAttribute
    public LocalAttribute use(String value);

}


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Basic ePubJS Example</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">
        <meta name="apple-mobile-web-app-capable" content="yes">

‹

›

              <input id="currentpg" size="3" maxlength="3"/> / 0


text:
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);

namespace IPC {
template <class P>
struct ParamTraits;
}  // namespace IPC

namespace gfx {

// Used to represent a full ICC profile, usually retrieved from a monitor. It
// can be lossily compressed into a ColorSpace object. This structure should
// only be sent from higher-privilege processes to lower-privilege processes,
// as parsing this structure is not secure.
class COLOR_SPACE_EXPORT ICCProfile {
 public:
  ICCProfile();
  ICCProfile(ICCProfile&& other);
  ICCProfile(const ICCProfile& other);
  ICCProfile& operator=(ICCProfile&& other);
  ICCProfile& operator=(const ICCProfile& other);
  ~ICCProfile();
  bool operator==(const ICCProfile& other) const;
  bool operator!=(const ICCProfile& other) const;

  // Returns true if this profile was successfully parsed by SkICC and will
  // return a valid ColorSpace.
  bool IsValid() const;

  // Create directly from profile data. This function should be called only
  // in the browser process (and the results from there sent to other
  // processes).
  static ICCProfile FromData(const void* icc_profile, size_t size);

  // Create a profile for a color space. Returns an invalid profile if the
  // specified space is not expressable as an ICCProfile.
  static ICCProfile FromColorSpace(const gfx::ColorSpace& color_space);

  // Return a ColorSpace that best represents this ICCProfile.
  ColorSpace GetColorSpace() const;

  // Return a ColorSpace with the primaries from this ICCProfile and an
  // sRGB transfer function.
  ColorSpace GetPrimariesOnlyColorSpace() const;

  // Returns true if GetColorSpace returns an accurate representation of this
  // ICCProfile. This could be false if the result of GetColorSpace had to
  // approximate transfer functions.
  bool IsColorSpaceAccurate() const;

  // Return the data for the profile.
  std::vector<char> GetData() const;

 private:
  class Internals : public base::RefCountedThreadSafe<ICCProfile::Internals> {
   public:
    explicit Internals(std::vector<char>);

    const std::vector<char> data_;

    // True iff we can create a valid ColorSpace (and ColorTransform) from this
    // object. The transform may be LUT-based (using an SkColorSpaceXform to
    // compute the lut).
    bool is_valid_ = false;

    // True iff |to_XYZD50_| and |transfer_fn_| are accurate representations of
    // the data in this profile. In this case ColorTransforms created from this
    // profile will be analytic and not LUT-based.
    bool is_parametric_ = false;

    // The best-fit parametric primaries and transfer function.
    skcms_Matrix3x3 to_XYZD50_;
    skcms_TransferFunction transfer_fn_;

   protected:
    friend class base::RefCountedThreadSafe<ICCProfile::Internals>;
    void Initialize();
    virtual ~Internals();
  };
  scoped_refptr<Internals> internals_;

  FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, BT709toSRGBICC);
  FRIEND_TEST_ALL_PREFIXES(SimpleColorSpace, GetColorSpace);
  friend int ::LLVMFuzzerTestOneInput(const uint8_t*, size_t);
  friend class ColorSpace;
  friend class ColorTransformInternal;
  friend struct IPC::ParamTraits<gfx::ICCProfile>;
};

}  // namespace gfx

#endif  // UI_GFX_ICC_PROFILE_H_


text:
using System;
using OpenCvSharp.Internal;

namespace OpenCvSharp;

// ReSharper disable once InconsistentNaming
/// <summary>
/// Brute-force descriptor matcher.
/// For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one.
/// </summary>
public class BFMatcher : DescriptorMatcher
{
    private Ptr? detectorPtr;

    /// <summary>
    ///
    /// </summary>
    /// <param name="normType"></param>
    /// <param name="crossCheck"></param>
    public BFMatcher(NormTypes normType = NormTypes.L2, bool crossCheck = false)
    {
        NativeMethods.HandleException(
            NativeMethods.features2d_BFMatcher_new((int) normType, crossCheck ? 1 : 0, out ptr));
        detectorPtr = null;
    }

    /// <summary>
    /// Creates instance by cv::Ptr<T>
    /// </summary>
    internal BFMatcher(Ptr detectorPtr)
    {
        this.detectorPtr = detectorPtr;
        ptr = detectorPtr.Get();
    }

    /// <summary>
    /// Creates instance by raw pointer T*
    /// </summary>
    internal BFMatcher(IntPtr rawPtr)
    {
        detectorPtr = null;
        ptr = rawPtr;
    }

    /// <summary>
    /// Creates instance from cv::Ptr<T> .
    /// ptr is disposed when the wrapper disposes.
    /// </summary>
    /// <param name="ptr"></param>
    internal new static BFMatcher FromPtr(IntPtr ptr)
    {
        if (ptr == IntPtr.Zero)
            throw new OpenCvSharpException("Invalid cv::Ptr<BFMatcher> pointer");
        var ptrObj = new Ptr(ptr);
        return new BFMatcher(ptrObj);
    }

    /// <summary>
    /// Releases managed resources
    /// </summary>
    protected override void DisposeManaged()
    {
        if (detectorPtr != null)
        {
            detectorPtr.Dispose();
            detectorPtr = null;
            ptr = IntPtr.Zero;
        }
        base.DisposeManaged();
    }

    /// <summary>
    /// Releases managed resources
    /// </summary>
    protected override void DisposeUnmanaged()
    {
        if (detectorPtr == null && ptr != IntPtr.Zero)
            NativeMethods.HandleException(
                NativeMethods.features2d_BFMatcher_delete(ptr));
        ptr = IntPtr.Zero;
        base.DisposeUnmanaged();
    }

    /// <summary>
    /// Return true if the matcher supports mask in match methods.
    /// </summary>
    /// <returns></returns>
    public override bool IsMaskSupported()
    {
        ThrowIfDisposed();
        NativeMethods.HandleException(
            NativeMethods.features2d_BFMatcher_isMaskSupported(ptr, out var ret));
        GC.KeepAlive(this);
        return ret != 0;
    }

    internal new class Ptr : OpenCvSharp.Ptr
    {
        public Ptr(IntPtr ptr) : base(ptr)
        {
        }

        public override IntPtr Get()
        {
            NativeMethods.HandleException(
                NativeMethods.features2d_Ptr_BFMatcher_get(ptr, out var ret));
            GC.KeepAlive(this);
            return ret;
        }

        protected override void DisposeUnmanaged()
        {
            NativeMethods.HandleException(
                NativeMethods.features2d_Ptr_BFMatcher_delete(ptr));
            base.DisposeUnmanaged();
        }
    }
}


text:
<?php
return array (
  'Activities' => 'Aktywności',
  'Activities provide an overview of taken actions in context of a space or other users. (e.g. a new post was written or a new member joined the space).' => '',
  'Always' => 'Zawsze',
  'Daily summary' => 'Dzienne podsumowanie',
  'Define the default behaviour for sending user e-mails. These settings can be overwritten by users in their account settings.' => '',
  'General' => 'Ogólne',
  'Never' => 'Nigdy',
  'Notifications' => 'Powiadomienia',
  'Notifications are user related information (e.g. new comments on own posts or a new follower). Notifications will also be created when an user-action is required (e.g. friendship request).' => '',
  'Save' => 'Zapisz',
  'Server Settings' => 'Ustawienia serwera',
  'When I´m offline' => 'Kiedy jestem offline',
);


text:
install_package()
{
  # See if packages are installed and install them.
  package=$1
  echo "*********************************************************"
  echo "* Requesting $package"
  status=$(dpkg-query -W -f='${Status} ${Version}\n' $package 2>/dev/null | wc -l)
  if [ "$status" -eq 0 ]; then
    echo "* Installing $package"
    echo "*********************************************************"
    sudo apt-get -yuV install $package
  else
    echo "* Already installed !!!"
    echo "*********************************************************"
  fi
}

echo "Installing additional Python packages..."
install_package "graphviz"

git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git


text:
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
import GHC.Conc (numCapabilities)

import System.FilePath.Posix ((</>))

import System.IO

import System.Directory
import qualified System.Console.CmdArgs as A
import System.Console.CmdArgs ((&=))

import Search.Common
import qualified Search.Collection as C
import qualified Search.SearchIndex as SI
import qualified Search.Cluster as Cl

import Data.Binary

import Control.Concurrent.ThreadPool

putInfo :: String -> IO ()
putInfo = hPutStrLn stderr

buildSearchIndex :: C.DocCollection a -> [DocId] -> IO SI.SearchIndex
buildSearchIndex coll dids = do
    builder <- SI.newSearchIndexBuilder coll
    putInfo "Loading docs..."
    docs <- C.loadTokenDocs coll dids
    putInfo "Indexing docs..."
    mapM_ (SI.indexTokenDoc builder) docs
    putInfo "Building index..."
    SI.buildSearchIndex builder

saveClusterSearchIndex :: FilePath -> C.DocCollection a -> Cl.Clustering DocId -> Cl.ClusterId -> IO ()
saveClusterSearchIndex baseDir coll clustering cid = do
    let dids = Cl.clusterToList clustering cid
    index <- buildSearchIndex coll dids
    let path = baseDir </> "searchindex_" ++ show (Cl.unClusterId cid)
    putInfo "Saving index..."
    encodeFile path index
    putInfo $ "Saved index for Cluster " ++ show cid

chunked :: Int -> [a] -> [[a]]
chunked _ [] = []
chunked size xs =
    let (chunk, rest) = splitAt size xs
    in chunk:chunked size rest

saveTempIndex :: FilePath -> C.DocCollection a -> [DocId] -> IO ()
saveTempIndex f coll dids = do
    fileExists <- doesFileExist f
    if not fileExists
       then do builder <- SI.newSearchIndexBuilder coll
               let processChunk chunk =
                       do putInfo $ "Processing chunk of size " ++ show (length chunk) ++ "..."
                          docs <- C.loadTokenDocs coll chunk
                          mapM_ (SI.indexTokenDoc builder) docs
               mapM_ processChunk $ chunked 100000 dids
               putInfo "Building temporary index..."
               index <- SI.buildSearchIndex builder
               putInfo "Saving..."
               encodeFile f index
               putInfo "Saved temporary index"
       else do putInfo "Index exists already, skipping..."
               return ()

saveSearchIndex :: FilePath -> C.DocCollection a -> Maybe Int -> Int -> IO ()
saveSearchIndex indexFile coll limit chunkSize = do
    let go i [] files = return files
        go i (ds:dss) files =
            do let f = tmpFileName i
               saveTempIndex f coll ds
               go (i+1) dss $ f:files
    putInfo "Generating temporary indexes..."
    files <- go 0 (chunked chunkSize dids) []
    putInfo "Joining index..."
    SI.joinIndexes files indexFile
    putInfo "Removing indexes..."
    mapM_ removeFile files
  where dids = case limit of
                 Just i -> take i $ C.enumerateDocIds coll
                 Nothing -> C.enumerateDocIds coll
        tmpFileName i = indexFile ++ ".tmp" ++ show i

data BIArgs = BIArgs
    { collectionDir :: FilePath
    , outputDir :: FilePath
    , clusteringFile :: Maybe FilePath
    , docLimit :: Maybe Int
    , tmpIndexSize :: Int
    } deriving (Eq, Show, A.Data, A.Typeable)

biArgs :: BIArgs
biArgs = BIArgs
    { collectionDir = A.def &= A.typ "COLLECTION_DIR" &= A.argPos 0
    , outputDir = A.def &= A.typ "OUTPUT_DIR/FILE" &= A.argPos 1
    , docLimit = A.def &= A.explicit &= A.name "doc-limit" &= A.help "maximum number of docs to cluster"
    , clusteringFile = Nothing &= A.explicit &= A.name "cluster-file" &= A.help "the clustering to use"
    , tmpIndexSize = 1000000 &= A.explicit &= A.name "temp-index-size" &= A.help "number of docs per temporary index"
    }

main :: IO ()
main = do
    args <- A.cmdArgs biArgs
    putInfo "Loading Document Collection..."
    !coll <- C.loadDocCollection (collectionDir args)
    case (clusteringFile args) of
      Just f -> do putInfo "Loading clustering..."
                   clustering <- decodeFile f
                   putInfo "Building Index..."
                   let save = saveClusterSearchIndex (outputDir args) coll clustering
                   --concurrentMapN_ numCapabilities save $ Cl.enumerateClusterIds clustering
                   mapM_ save $ Cl.enumerateClusterIds clustering
      Nothing -> do putInfo "Building Index..."
                    saveSearchIndex (outputDir args) coll (docLimit args) (tmpIndexSize args)


text:
import { AndroidManifest, ConfigPlugin } from '@expo/config-plugins';
import { ExpoConfig } from '@expo/config-types';
export declare const withGeneratedAndroidScheme: ConfigPlugin;
export declare function setGeneratedAndroidScheme(config: Pick<ExpoConfig, 'scheme' | 'slug'>, androidManifest: AndroidManifest): AndroidManifest;


text:
<!DOCTYPE html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="adi.css">
<link rel="shortcut icon" href="favicon.png" type="image/vnd.microsoft.icon" />
<link rel="icon" href="favicon.png" type="image/vnd.microsoft.icon" />
<link rel="apple-touch-icon" href="favicon-152.png"/>
<title>Japan Software Freedom Corps (Hakaba Hitoyo)</title>

	English
	日本語

Japan Software Freedom Corps (Hakaba Hitoyo)

Clean and rationalistic software products.

Products

Pastel Stitch

Small but practical programming language.

Open source (AGPL) implementation.

Public domain documents.

Online demo

Author

Hakaba Hitoyo@GitHub

Acknowledgements

Images

www.roy.hi-ho.ne.jp/<wbr>keik/yoii/sozai

commons.wikimedia.org/<wbr>wiki/File:Daggers.svg

inthename-stock.deviantart.com/<wbr>art/Use-This-308-104111115


text:
/*	$NetBSD: extern.h,v 1.6 2014/07/15 13:17:15 christos Exp $	*/

/*
 * Copyright (c) 1980, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *      @(#)extern.h	8.1 (Berkeley) 6/6/93
 */

extern bool	x_escaped;             /* if last character was an escape */
extern char    *x_start;               /* start of the current string */
extern char    *l_acmbeg;              /* string introducing a comment */
extern char    *l_acmend;              /* string ending a comment */
extern char    *l_blkbeg;              /* string begining of a block */
extern char    *l_blkend;              /* string ending a block */
extern char    *l_chrbeg;              /* delimiter for character constant */
extern char    *l_chrend;              /* delimiter for character constant */
extern char    *l_combeg;              /* string introducing a comment */
extern char    *l_comend;              /* string ending a comment */
extern char     l_escape;              /* character used to escape characters */
extern char    *l_keywds[];    	       /* keyword table address */
extern bool     l_onecase;             /* upper and lower case are equivalent */
extern char    *l_prcbeg;              /* regular expr for procedure begin */
extern char    *l_strbeg;              /* delimiter for string constant */
extern char    *l_strend;              /* delimiter for string constant */
extern bool     l_toplex;              /* procedures only defined at top lex level */
extern const char *language;           /* the language indicator */

#include <sys/cdefs.h>

__BEGIN_DECLS
extern int      STRNCMP __P((char *, char *, int));
extern char    *convexp __P((char *));
extern char    *expmatch __P((char *, char *, char *));
__END_DECLS