text:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/
package org.team484.fluffy;

import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import org.team484.fluffy.commands.Autonomous;
import org.team484.fluffy.commands.Autonomous2;
import org.team484.fluffy.commands.CommandBase;

public class Robot extends IterativeRobot {

    Command autonomousCommand;
    Command autonomous2Command;
    Compressor compressor;
    protected DriverStation ds;
    Relay LEDs;
    Joystick drive = new Joystick(RobotMap.driveStick);
    double counter = 0;
    public void robotInit() {
        Relay camLED = new Relay(RobotMap.camLED);

        LEDs = new Relay(RobotMap.spikeLED);
        ds = DriverStation.getInstance();
        System.out.println(ds.getAlliance().value);
        if (ds.getAlliance().value == 0) {
            //Red Team
            System.out.println("Go Red!");
            try {
                LEDs.set(Relay.Value.kReverse);
            } catch (Exception e) {
            }
        } else {
            //Blue Team
            System.out.println("Go Blue!");
            try {
                LEDs.set(Relay.Value.kForward);
            } catch (Exception e) {
            }
        }
        camLED.set(Relay.Value.kReverse);
        autonomousCommand = new Autonomous();
        autonomous2Command = new Autonomous2();
        CommandBase.init();
        compressor = new Compressor(RobotMap.pressureSwitch, RobotMap.compressorRelay);
        compressor.start();
    }

    public void autonomousInit() {
        if (ds.getDigitalIn(1)) {
            autonomousCommand.start();
        } else {
            autonomous2Command.start();
        }
        if (ds.getAlliance().value == 0) {
            //Red Team
            System.out.println("Go Red!");
            try {
                LEDs.set(Relay.Value.kReverse);
            } catch (Exception e) {
            }
        } else {
            //Blue Team
            System.out.println("Go Blue!");
            try {
                LEDs.set(Relay.Value.kForward);
            } catch (Exception e) {
            }
        }
    }

    public void autonomousPeriodic() {
        Scheduler.getInstance().run();
    }

    public void teleopInit() {
        autonomous2Command.cancel();
        autonomousCommand.cancel();
        if (ds.getAlliance().value == 0) {
            //Red Team
            System.out.println("Go Red!");
            try {
                LEDs.set(Relay.Value.kReverse);
            } catch (Exception e) {
            }
        } else {
            //Blue Team
            System.out.println("Go Blue!");
            try {
                LEDs.set(Relay.Value.kForward);
            } catch (Exception e) {
            }
        }
    }

    public void teleopPeriodic() {
        Scheduler.getInstance().run();
        SmartDashboard.putBoolean("Pressure Gauge", compressor.getPressureSwitchValue());
        /**try {
            if (drive.getZ() + 1 < 0.1) {
                if (ds.getAlliance().value == 0) {
            //Red Team
            try {
                LEDs.set(Relay.Value.kReverse);
            } catch (Exception e) {
            }
        } else {
            //Blue Team
            try {
                LEDs.set(Relay.Value.kForward);
            } catch (Exception e) {
            }
        }
            } else {
                if (counter < 5) {
                    counter = counter + drive.getZ() + 1;
                } else {
                    counter = 0;
                    if (LEDs.get() == Relay.Value.kForward) {
                        LEDs.set(Relay.Value.kReverse);
                    } else {
                        LEDs.set(Relay.Value.kForward);
                    }
                }
            }
        } catch (Exception e) {

        }**/
    }

    public void testPeriodic() {

        LiveWindow.run();
    }
}


text:
package com.example.test5;

import android.graphics.Bitmap;
import android.widget.ImageView;

public class ImageDownloader {

	public void download(String url, ImageView imageview) {
		Bitmap bitmap;
		//imageview.setImageBitmap(bitmap);
	}

}

redpajama_set_name: RedPajamaGithub


text:
pageid: nodejs
title: NodeJS
layout: docs
section: Invocation
permalink: docs/nodejs.html
---

To install the nodejs client:

```bash
$ npm install fb-watchman
```

and to import it and create a client instance:

```js
var watchman = require('fb-watchman');
var client = new watchman.Client();
```

This documentation assumes that you are using the latest available version
of the `fb-watchman` package published to the npm repository.

## Checking for watchman availability

The client can be installed without requiring that the service is installed.
It is important to handle lack of availability and also to test whether
the installed service supports the [capabilities](/watchman/docs/capabilities.html)
required by your application.

The `capabilityCheck` method issues a [version](
/watchman/docs/cmds/version.html) command to query the capabilities of the
server.

```js
var watchman = require('fb-watchman');
var client = new watchman.Client();
client.capabilityCheck({optional:[], required:['relative_root']},
  function (error, resp) {
    if (error) {
      // error will be an Error object if the watchman service is not
      // installed, or if any of the names listed in the `required`
      // array are not supported by the server
      console.error(error);
    }
    // resp will be an extended version response:
    // {'version': '3.8.0', 'capabilities': {'relative_root': true}}
    console.log(resp);
  });
```

## Initiating a watch

Almost every operation in watchman revolves around watching a directory tree.
You can repeatedly ask to watch the same directory without error; watchman will
re-use an existing watch.

```js
var watchman = require('fb-watchman');
var client = new watchman.Client();

var dir_of_interest = "/some/path";

client.capabilityCheck({optional:[], required:['relative_root']},
  function (error, resp) {
    if (error) {
      console.log(error);
      client.end();
      return;
    }

    // Initiate the watch
    client.command(['watch-project', dir_of_interest],
      function (error, resp) {
        if (error) {
          console.error('Error initiating watch:', error);
          return;
        }

        // It is considered to be best practice to show any 'warning' or
        // 'error' information to the user, as it may suggest steps
        // for remediation
        if ('warning' in resp) {
          console.log('warning: ', resp.warning);
        }

        // `watch-project` can consolidate the watch for your
        // dir_of_interest with another watch at a higher level in the
        // tree, so it is very important to record the `relative_path`
        // returned in resp

        console.log('watch established on ', resp.watch,
                    ' relative_path', resp.relative_path);
      });
  });
```

## Subscribing to changes

Most node applications are interested in subscribing to live file
change notifications.  In watchman these are configured by issuing
a [subscribe](/watchman/docs/cmd/subscribe.html) command.  A subscription
is valid for the duration of your client connection, or until you cancel
the subscription using the [unsubscribe](/watchman/docs/cmd/unsubscribe.html)
command.

The following will generate subscription results for all files in the
tree that match the query expression and then generate subscription
results as files change:

```js
// `watch` is obtained from `resp.watch` in the `watch-project` response.
// `relative_path` is obtained from `resp.relative_path` in the
// `watch-project` response.
function make_subscription(client, watch, relative_path) {
  sub = {
    // Match any `.js` file in the dir_of_interest
    expression: ["allof", ["match", "*.js"]],
    // Which fields we're interested in
    fields: ["name", "size", "mtime_ms", "exists", "type"]
  };
  if (relative_path) {
    sub.relative_root = relative_path;
  }

  client.command(['subscribe', watch, 'mysubscription', sub],
    function (error, resp) {
      if (error) {
        // Probably an error in the subscription criteria
        console.error('failed to subscribe: ', error);
        return;
      }
      console.log('subscription ' + resp.subscribe + ' established');
    });

  // Subscription results are emitted via the subscription event.
  // Note that this emits for all subscriptions.  If you have
  // subscriptions with different `fields` you will need to check
  // the subscription name and handle the differing data accordingly.
  // `resp`  looks like this in practice:
  //
  // { root: '/private/tmp/foo',
  //   subscription: 'mysubscription',
  //   files: [ { name: 'node_modules/fb-watchman/index.js',
  //       size: 4768,
  //       exists: true,
  //       type: 'f' } ] }
  client.on('subscription', function (resp) {
    if (resp.subscription !== 'mysubscription') return;

    resp.files.forEach(function (file) {
      // convert Int64 instance to javascript integer
      const mtime_ms = +file.mtime_ms;

      console.log('file changed: ' + file.name, mtime_ms);
    });
  });
}
```

### Subscribing only to changed files

The example above will generate results for existing (and deleted!) files at
the time that the subscription is established.  In some applications this can
be undesirable.  The following example shows how to add a logical time constraint.

watchman tracks changes using an [abstract clock](
/watchman/docs/clockspec.html).  We'll determine the current clock at the time
that we initiate the watch and then add that as a constraint in our subscription.

```js
function make_time_constrained_subscription(client, watch, relative_path) {
  client.command(['clock', watch], function (error, resp) {
    if (error) {
      console.error('Failed to query clock:', error);
      return;
    }

    sub = {
      // Match any `.js` file in the dir_of_interest
      expression: ["allof", ["match", "*.js"]],
      // Which fields we're interested in
      fields: ["name", "size", "exists", "type"],
      // add our time constraint
      since: resp.clock
    };

    if (relative_path) {
      sub.relative_root = relative_path;
    }

    client.command(['subscribe', watch, 'mysubscription', sub],
      function (error, resp) {
        // handle the result here
      });
  });
}
```

## NodeJS API Reference

## Methods

### client.capabilityCheck(options, done)

The `capabilityCheck` method issues a [version](
/watchman/docs/cmds/version.html) command to query the capabilities of the
server.

If the server doesn't support capabilities, `capabilityCheck` will emulate
the capability response for a handful of significant capabilities based
on the version reported by the server.

The `options` argument may contain the following properties:

* `optional` an array listing optional capability names
* `required` an array listing required capability names

The properties are passed through to the underlying `version` command.

The `done` parameter is a callback that will be passed (error, result) when the
command completes.  It doesn't make sense to issue a `capabilityCheck` call and
not provide the `done` callback.

The response object will contain a `capabilities` object property whose keys
will be the union of the `optional` and `required` capability names and whose
values will be either `true` or `false` depending on the availability of the
capability name.

If any of the `required` capabilities are not supported by the server, the
`error` parameter in the `done` callback will be set and will contain a
meaningful error message.

```js
client.capabilityCheck({optional:[], required:['relative_root']},
  function (error, resp) {
    if (error) {
      // error will be an Error object if the watchman service is not
      // installed, or if any of the names listed in the `required`
      // array are not supported by the server
      console.error(error);
    }
    // resp will be an extended version response:
    // {'version': '3.8.0', 'capabilities': {'relative_root': true}}
    console.log(resp);
  });
```

### client.command(args [, done])

Sends a command to the watchman service.  `args` is an array that specifies
the command name and any optional arguments.  The command is queued and
dispatched asynchronously.  You may queue multiple commands to the service;
they will be dispatched in FIFO order once the client connection is established.

The `done` parameter is a callback that will be passed (error, result) when the
command completes.  You may omit it if you are not interested in the result of
the command.

```js
client.command(['watch-project', process.cwd()], function(error, resp) {
  if (error) {
    console.log('watch failed: ', error);
    return;
  }
  if ('warning' in resp) {
    console.log('warning: ', resp.warning);
  }
  if ('relative_path' in resp) {
    // We will need to remember and adjust for relative_path
    console.log('watching project ', resp.watch, ' relative path to cwd is ',
      resp.relative_path);
  } else {
    console.log('watching ', resp.watch);
  }
});
```

If a field named `warning` is present in `resp`, the watchman service is trying
to communicate an issue that the user should see and address.  For example, if
the system watch resources need adjustment, watchman will provide information
about this and how to remediate the issue.  It is suggested that tools that
build on top of this library bubble the warning message up to the user.

### client.end()

Terminates the connection to the watchman service.  Does not wait
for any queued commands to send.

## Events

The following events are emitted by the watchman client object:

### Event: 'connect'

Emitted when the client successfully connects to the watchman service

### Event: 'error'

Emitted when the socket to the watchman service encounters an error.

It may also be emitted prior to establishing a connection if we are unable
to successfully execute the watchman CLI binary to determine how to talk
to the server process.

It is passed a variable that encapsulates the error.

### Event: 'end'

Emitted when the socket to the watchman service is closed

### Event: 'log'

Emitted in response to a unilateral `log` PDU from the watchman service.
To enable these, you need to send a `log-level` command to the service:

```js
// This is very verbose, you probably don't want to do this
client.command(['log-level', 'debug']);
client.on('log', function(info) {
  console.log(info);
});
```

### Event: 'subscription'

Emitted in response to a unilateral `subscription` PDU from the watchman
service.  To enable these, you need to send a `subscribe` command to the service:

```js
  // Subscribe to notifications about .js files
  client.command(['subscribe', process.cwd(), 'mysubscription', {
      expression: ["match", "*.js"]
    }],
    function(error, resp) {
      if (error) {
        // Probably an error in the subscription criteria
        console.log('failed to subscribe: ', error);
        return;
      }
      console.log('subscription ' + resp.subscribe + ' established');
    }
  );

  // Subscription results are emitted via the subscription event.
  // Note that watchman will deliver a list of all current files
  // when you first subscribe, so you don't need to walk the tree
  // for yourself on startup
  client.on('subscription', function(resp) {
    console.log(resp.root, resp.subscription, resp.files);
  });
```

To cancel a subscription, use the `unsubscribe` command and pass in the name of
the subscription you want to cancel:

```js
  client.command(['unsubscribe', process.cwd(), 'mysubscription']);
```

Note that subscriptions names are scoped to your connection to the watchman
service; multiple different clients can use the same subscription name without
fear of colliding.


text:
"""
File for running tests programmatically.
"""

# Third party imports
import pytest

def main():
    """
    Run pytest tests.
    """
    errno = pytest.main(['-x', 'spyder_vim', '-v',
                         '-rw', '--durations=10',
                         '--cov=spyder_vim', '--cov-report=term-missing'])

    # sys.exit doesn't work here because some things could be running
    # in the background (e.g. closing the main window) when this point
    # is reached. And if that's the case, sys.exit does't stop the
    # script (as you would expected).
    if errno != 0:
        raise SystemExit(errno)

if __name__ == '__main__':
    main()


text:
require 'rexml/document'

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    class SecurePayAuGateway < Gateway
      API_VERSION = 'xml-4.2'

      TEST_URL = 'https://www.securepay.com.au/test/payment'
      LIVE_URL = 'https://www.securepay.com.au/xmlapi/payment'

      self.supported_countries = ['AU']
      self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :jcb]

      # The homepage URL of the gateway
      self.homepage_url = 'http://securepay.com.au'

      # The name of the gateway
      self.display_name = 'SecurePay'

      class_inheritable_accessor :request_timeout
      self.request_timeout = 60

      self.money_format = :cents
      self.default_currency = 'AUD'

      # 0 Standard Payment
      # 4 Refund
      # 6 Client Reversal (Void)
      # 10 Preauthorise
      # 11 Preauth Complete (Advice)
      TRANSACTIONS = {
        :purchase => 0,
        :authorization => 10,
        :capture => 11,
        :void => 6,
        :credit => 4
      }

      SUCCESS_CODES = [ '00', '08', '11', '16', '77' ]

      def initialize(options = {})
        requires!(options, :login, :password)
        @options = options
        super
      end

      def test?
        @options[:test] || super
      end

      def purchase(money, credit_card, options = {})
        commit :purchase, build_purchase_request(money, credit_card, options)
      end

      private

      def build_purchase_request(money, credit_card, options)
        xml = Builder::XmlMarkup.new

        xml.tag! 'amount', amount(money)
        xml.tag! 'currency', options[:currency] || currency(money)
        xml.tag! 'purchaseOrderNo', options[:order_id].to_s.gsub(/[ ']/, '')

        xml.tag! 'CreditCardInfo' do
          xml.tag! 'cardNumber', credit_card.number
          xml.tag! 'expiryDate', expdate(credit_card)
          xml.tag! 'cvv', credit_card.verification_value if credit_card.verification_value?
        end

        xml.target!
      end

      def build_request(action, body)
        xml = Builder::XmlMarkup.new
        xml.instruct!
        xml.tag! 'SecurePayMessage' do
          xml.tag! 'MessageInfo' do
            xml.tag! 'messageID', Utils.generate_unique_id.slice(0, 30)
            xml.tag! 'messageTimestamp', generate_timestamp
            xml.tag! 'timeoutValue', request_timeout
            xml.tag! 'apiVersion', API_VERSION
          end

          xml.tag! 'MerchantInfo' do
            xml.tag! 'merchantID', @options[:login]
            xml.tag! 'password', @options[:password]
          end

          xml.tag! 'RequestType', 'Payment'
          xml.tag! 'Payment' do
            xml.tag! 'TxnList', "count" => 1 do
              xml.tag! 'Txn', "ID" => 1 do
                xml.tag! 'txnType', TRANSACTIONS[action]
                xml.tag! 'txnSource', 23
                xml << body
              end
            end
          end
        end

        xml.target!
      end

      def commit(action, request)
        response = parse(ssl_post(test? ? TEST_URL : LIVE_URL, build_request(action, request)))

        Response.new(success?(response), message_from(response), response,
          :test => test?,
          :authorization => authorization_from(response)
        )
      end

      def success?(response)
        SUCCESS_CODES.include?(response[:response_code])
      end

      def authorization_from(response)
        response[:txn_id]
      end

      def message_from(response)
        response[:response_text] || response[:status_description]
      end

      def expdate(credit_card)
        "#{format(credit_card.month, :two_digits)}/#{format(credit_card.year, :two_digits)}"
      end

      def parse(body)
        xml = REXML::Document.new(body)

        response = {}

        xml.root.elements.to_a.each do |node|
          parse_element(response, node)
        end

        response
      end

      def parse_element(response, node)
        if node.has_elements?
          node.elements.each{|element| parse_element(response, element) }
        else
          response[node.name.underscore.to_sym] = node.text
        end
      end

      # YYYYDDMMHHNNSSKKK000sOOO
      def generate_timestamp
        time = Time.now.utc
        time.strftime("%Y%d%m%H%M%S#{time.usec}+000")
      end
    end
  end
end


text:
undeadlifts.config(
  [         '$stateProvider',
    function($stateProvider) {
      $stateProvider.state('user.workout',
        {
          url: '/workout',
          templateUrl: 'user/workout/workout.html',
          controller: 'WorkoutController',
          resolve: {
            'workout': ['firebase', 'user', function(firebase, user) {
              if (!user.current_workout) { return false; }
              var path = ['workouts', user.current_workout];
              return firebase.sync(path).$asObject().$loaded();
            }]
          }
        }
      );
    }
  ]
);
undeadlifts.controller('WorkoutController',
  [         '$rootScope', '$scope', '$state', '$timeout', '$filter', 'firebase', 'util', 'log', 'user', 'workout',
    function($rootScope,   $scope,   $state,   $timeout,   $filter,   firebase,   util,   log,   user,   workout) {
      $scope.restTimerTimeout = null;
      $scope.restTimerInterval = null;
      $scope.showRestTimer = false;
      $scope.restTime = 0;

      if (!workout || !workout.routine) {
        $state.transitionTo('user.select-routine', {}, { location: 'replace' });
        return;
      }

      workout.$bindTo($scope, 'workout').then(function() {
        var valid = validateWorkout($scope.workout);
        if (!valid) {
          $state.transitionTo('user.select-routine', {}, { location: 'replace' });
          return;
        }
        $scope.date = util.parseYyyyMmDd($scope.workout.yyyymmdd);
        $scope.routine = $scope.workout.routine;
      });

      $scope.$watch('workout.yyyymmdd', function(newVal, oldVal) {
        if (typeof newVal !== 'string') { return; }
        $scope.date = util.parseYyyyMmDd($scope.workout.yyyymmdd);
      });

      var path = ['workouts', workout.$id, 'routine', 'lifts'];
      $scope.lifts = firebase.sync(path).$asArray();
      $scope.lifts.$loaded().then(function() {
        var lifts = $scope.lifts;
        for (var i = 0; i < lifts.length; i++) {
          var lift = lifts[i];
          if (!lift.weight) {
            lift.weight = user.working_weight[lift.name];
            lifts.$save(i);
          }

          $scope.$watch('lifts[' + i + ']', onLiftChange, true);
        }
      });

      function onLiftChange(newVal, oldVal) {
        $scope.lifts.$save(newVal);
        var startTimer = false;
        var target, completed;
        if (!allSetsCompleted(newVal.sets)) {
          for (var i = 0; i < newVal.sets.length; i++) {
            var newCompleted = newVal.sets[i].completed;
            var oldCompleted = oldVal.sets[i].completed;
            // Check if this is the set that changed and if the set has been marked completed
            if (newCompleted !== oldCompleted && newCompleted !== undefined) {
              startTimer = true;
              target = newVal.sets[i].target;
              completed = newCompleted;
            }
          }
        }

        if (startTimer) {
          $rootScope.restTimer.start(target, completed);
        } else {
          $rootScope.restTimer.clear();
        }

        function allSetsCompleted(sets) {
          var completed = true;
          for (var i = 0; i < sets.length; i++) {
            if (sets[i].completed === undefined) {
              completed = false;
            }
          }
          return completed;
        }
      }

      function validateWorkout(workout) {
        var valid = workout.yyyymmdd && workout.routine;
        if (valid) {
          return true;
        } else {
          delete user.current_workout;
          user.$save();
          return false;
        }
      }

      $scope.finishWorkout = function() {
        var yyyymmdd = $scope.workout.yyyymmdd;
        user.history = user.history || {};
        var workout_exists = typeof user.history[yyyymmdd] === 'string';
        if (workout_exists && user.history[yyyymmdd] !== $scope.workout.$id) {
          if (confirm('A workout already exists for this date. Do you want to overwrite it with this one?')) {
            saveWorkout();
          }
        } else {
          saveWorkout();
        }

        function saveWorkout() {
          user.history[$scope.workout.yyyymmdd] = user.current_workout;
          delete $scope.workout.yyyymmdd;
          delete user.current_workout;
          user.$save().then(function(ref) {
            $state.transitionTo('user.index', {}, {});
          });
        }
      };

      $scope.$on('workout.delete', function() {
        if (confirm('Are you sure you want to delete this workout?')) {
          delete user.current_workout;
          firebase.sync(['workouts', $scope.workout.$id]).$remove();
          user.$save().then(function(ref) {
            $state.transitionTo('user.index', {}, {});
          });
        }
      });
    }
  ]
);


text:
#ifndef __MACH_CLOCK_GENERIC_H
#define __MACH_CLOCK_GENERIC_H

#include <mach/clk-provider.h>

/* ==================== Mux clock ==================== */

struct clk_src {
	struct clk *src;
	int sel;
};

struct mux_clk;

struct clk_mux_ops {
	int (*set_mux_sel)(struct mux_clk *clk, int sel);
	int (*get_mux_sel)(struct mux_clk *clk);

	/* Optional */
	bool (*is_enabled)(struct mux_clk *clk);
	int (*enable)(struct mux_clk *clk);
	void (*disable)(struct mux_clk *clk);
};

#define MUX_SRC_LIST(...) \
	.parents = (struct clk_src[]){__VA_ARGS__}, \
	.num_parents = ARRAY_SIZE(((struct clk_src[]){__VA_ARGS__}))

struct mux_clk {
	/* Parents in decreasing order of preference for obtaining rates. */
	struct clk_src	*parents;
	int		num_parents;
	struct clk	*safe_parent;
	int		safe_sel;
	struct clk_mux_ops *ops;
	/* Recursively search for the requested parent. */
	bool		rec_set_par;

	/* Fields not used by helper function. */
	void *const __iomem *base;
	u32		offset;
	u32		en_offset;
	int		en_reg;
	u32		mask;
	u32		shift;
	u32		en_mask;
	void		*priv;

	struct clk	c;
};

static inline struct mux_clk *to_mux_clk(struct clk *c)
{
	return container_of(c, struct mux_clk, c);
}

int parent_to_src_sel(struct clk_src *parents, int num_parents, struct clk *p);

extern struct clk_ops clk_ops_gen_mux;

/* ==================== Divider clock ==================== */

struct div_clk;

struct clk_div_ops {
	int (*set_div)(struct div_clk *clk, int div);
	int (*get_div)(struct div_clk *clk);
	bool (*is_enabled)(struct div_clk *clk);
	int (*enable)(struct div_clk *clk);
	void (*disable)(struct div_clk *clk);
};

struct div_data {
	unsigned int div;
	unsigned int min_div;
	unsigned int max_div;
	unsigned long rate_margin;
};

struct div_clk {
	struct div_data data;

	/* Optional */
	struct clk_div_ops *ops;

	/* Fields not used by helper function. */
	void *const __iomem *base;
	u32		offset;
	u32		mask;
	u32		shift;
	u32		en_mask;
	void		*priv;
	struct clk	c;
};

static inline struct div_clk *to_div_clk(struct clk *c)
{
	return container_of(c, struct div_clk, c);
}

extern struct clk_ops clk_ops_div;
extern struct clk_ops clk_ops_slave_div;

struct ext_clk {
	struct clk c;
};

extern struct clk_ops clk_ops_ext;

#define DEFINE_FIXED_DIV_CLK(clk_name, _div, _parent) \
static struct div_clk clk_name = {	\
	.data = {				\
		.div = _div,			\
	},					\
	.c = {					\
		.parent = _parent,		\
		.dbg_name = #clk_name,		\
		.ops = &clk_ops_div,		\
		CLK_INIT(clk_name.c),		\
	}					\
}

#define DEFINE_FIXED_SLAVE_DIV_CLK(clk_name, _div, _parent) \
static struct div_clk clk_name = {	\
	.data = {				\
		.div = _div,			\
	},					\
	.c = {					\
		.parent = _parent,		\
		.dbg_name = #clk_name,		\
		.ops = &clk_ops_slave_div,		\
		CLK_INIT(clk_name.c),		\
	}					\
}

#define DEFINE_EXT_CLK(clk_name, _parent) \
static struct ext_clk clk_name = {		\
	.c = {					\
		.parent = _parent,		\
		.dbg_name = #clk_name,		\
		.ops = &clk_ops_ext,		\
		CLK_INIT(clk_name.c),		\
	}					\
}

/* ==================== Mux Div clock ==================== */

struct mux_div_clk;

/*
 * struct mux_div_ops
 * the enable and disable ops are optional.
 */

struct mux_div_ops {
	int (*set_src_div)(struct mux_div_clk *, u32 src_sel, u32 div);
	void (*get_src_div)(struct mux_div_clk *, u32 *src_sel, u32 *div);
	int (*enable)(struct mux_div_clk *);
	void (*disable)(struct mux_div_clk *);
	bool (*is_enabled)(struct mux_div_clk *);
};

/*
 * struct mux_div_clk - combined mux/divider clock
 * @priv
		parameters needed by ops
 * @safe_freq
		when switching rates from A to B, the mux div clock will
		instead switch from A -> safe_freq -> B. This allows the
		mux_div clock to change rates while enabled, even if this
		behavior is not supported by the parent clocks.

		If changing the rate of parent A also causes the rate of
		parent B to change, then safe_freq must be defined.

		safe_freq is expected to have a source clock which is always
		on and runs at only one rate.
 * @parents
		list of parents and mux indicies
 * @ops
		function pointers for hw specific operations
 * @src_sel
		the mux index which will be used if the clock is enabled.
 */

struct mux_div_clk {
	/* Required parameters */
	struct mux_div_ops		*ops;
	struct div_data			data;
	struct clk_src			*parents;
	u32				num_parents;

	struct clk			c;

	/* Internal */
	u32				src_sel;

	/* Optional parameters */
	void				*priv;
	void __iomem			*base;
	u32				div_mask;
	u32				div_offset;
	u32				div_shift;
	u32				src_mask;
	u32				src_offset;
	u32				src_shift;
	u32				en_mask;
	u32				en_offset;

	u32				safe_div;
	struct clk			*safe_parent;
	unsigned long			safe_freq;
};

static inline struct mux_div_clk *to_mux_div_clk(struct clk *clk)
{
	return container_of(clk, struct mux_div_clk, c);
}

extern struct clk_ops clk_ops_mux_div_clk;

#endif


text:
package edu.cmu.sv.ws.ssnoc.data.po;

/**
 * Created by vignan on 9/28/14.
 */

import com.google.gson.Gson;

import java.sql.Time;
import java.sql.Timestamp;

/**
 * This is the persistence class to save all user status information in the system.
 * This contains information like the user's name, his status, his status createdAt
 * information entered by the user when updating his status
 * Information is saved in SSN_STATUS_CRUMB table.
 *
 */
public class StatusPO {
    private String userName;
    private String statusCode;
    private String createdDate;
    private long crumbID;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        this.statusCode = statusCode;
    }

    public String getCreatedDate() { return createdDate; }

    public void setCreatedDate(String createdDate) {
        this.createdDate = createdDate;
    }

    public long getCrumbID() {
        return crumbID;
    }

    public void setCrumbID(long crumbID) {
        this.crumbID = crumbID;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }

}


text:
var makeString = require('./helper/makeString');

var from  = "ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž",
    to    = "aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz";

from += from.toUpperCase();
to += to.toUpperCase();

to = to.split("");

// for tokens requireing multitoken output
from += "ß";
to.push('ss');

module.exports = function cleanDiacritics(str) {
    return makeString(str).replace(/.{1}/g, function(c){
      var index = from.indexOf(c);
      return index === -1 ? c : to[index];
  });
};


text:
const express = require("express"),
  path = require("path"),
  bodyParser = require("body-parser");

import type { $Request, $Response } from "express";

function defaultContentTypeMiddleware(req: $Request, res: $Response, next) {
  req.headers["content-type"] =
    req.headers["content-type"] || "application/json";
  next();
}

type APIRouters = {
  contents: express.Router,
  discovery: express.Router
};

function createAPIRouter(api: APIRouters): express.Router {
  const router = express.Router();
  router.use(defaultContentTypeMiddleware);
  router.use(bodyParser.json({ limit: "50mb" })); //50mb is the current threshold
  router.use(bodyParser.urlencoded({ extended: true }));

  router.use("/ping", (req: $Request, res: $Response) => {
    res.json({ message: "pong" });
  });

  router.use("/contents", api.contents);
  router.use("/v1/discovery", api.discovery);
  return router;
}

module.exports = createAPIRouter;


text:
Background Format
=================

BCK files are basically PCX format files with different header (256 colors,
with palette).

HEADER
------

length: 0x14 (20) bytes

 * offset 0x0 - 0x13: file magic "0x07 [SaemSong]PCXtoHNP 0x1A"

DATA
----

 * raw image data

FOOTER
------

length: 0x300 (768) bytes

 * 256 color palette

---

Additional Information
----------------------

Because the pcx-header is removed, there is no dimensions defined in the file
itself. I guessed 320x200, because that was the most used resolution back then.
So, if we replace the custom header with a standard pcx header, set bit depth
to 8, dimensions 319x199 and empty 16 colors palette, the Gimp can open the
images without complaining.

```edc``` can convert bck to pcx.

A thumbnail of the converted backgrounds (eraXXX.pcx) and the other included
pcx files is available here:

![BCK2PCX](imgs/eracha_bck2pcx.png)


text:
"""
Room

Rooms are simple containers that has no location of their own.

"""

from evennia import DefaultRoom

class Room(DefaultRoom):
    """
    Rooms are like any Object, except their location is None
    (which is default). They also use basetype_setup() to
    add locks so they cannot be puppeted or picked up.
    (to change that, use at_object_creation instead)

    See examples/object.py for a list of
    properties and methods available on all Objects.
    """
    pass

    def at_emit(self, caller, emit):
        return emit


text:
require 'helper'

class TestRegressionExcel2003Style04 < Test::Unit::TestCase
  def setup
    setup_dir_var
  end

  def teardown
    File.delete(@xlsx) if File.exist?(@xlsx)
  end

  def test_excel2003_style04
    @xlsx = 'excel2003_style04.xlsx'
    workbook    = WriteXLSX.new(@xlsx, :excel2003_style => true)
    worksheet   = workbook.add_worksheet

    worksheet.write('A1', 'Foo')
    worksheet.set_row(0, 21)

    workbook.close
    compare_xlsx_for_regression(File.join(@regression_output, @xlsx), @xlsx)
  end
end


text:
namespace planetNS
{
    const int   WIDTH = 128;                // image width
    const int   HEIGHT = 128;               // image height
    const int   COLLISION_RADIUS = 120/2;   // for circular collision
    const int   X = GAME_WIDTH/2 - WIDTH/2; // location on screen
    const int   Y = GAME_HEIGHT/2 - HEIGHT/2;
    const float MASS = 1.0e14f;         // mass
    const int   TEXTURE_COLS = 2;       // texture has 2 columns
    const int   START_FRAME = 1;        // starts at frame 1
    const int   END_FRAME = 1;          // no animation
}

class Planet : public Entity            // inherits from Entity class
{
public:
    // constructor
    Planet();
};
#endif


text:
package bammerbom.ultimatecore.sponge.modules.home.commands;

import bammerbom.ultimatecore.sponge.UltimateCore;
import bammerbom.ultimatecore.sponge.api.command.HighCommand;
import bammerbom.ultimatecore.sponge.api.command.annotations.CommandInfo;
import bammerbom.ultimatecore.sponge.api.command.argument.Arguments;
import bammerbom.ultimatecore.sponge.api.language.utils.Messages;
import bammerbom.ultimatecore.sponge.api.permission.Permission;
import bammerbom.ultimatecore.sponge.api.user.UltimateUser;
import bammerbom.ultimatecore.sponge.modules.home.HomeModule;
import bammerbom.ultimatecore.sponge.modules.home.api.Home;
import bammerbom.ultimatecore.sponge.modules.home.api.HomeKeys;
import bammerbom.ultimatecore.sponge.modules.home.api.HomePermissions;
import bammerbom.ultimatecore.sponge.modules.home.commands.arguments.HomeArgument;
import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
import org.spongepowered.api.command.args.CommandElement;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.text.Text;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@CommandInfo(module = HomeModule.class, aliases = {"delhome", "removehome"})
public class DelhomeCommand implements HighCommand {

    @Override
    public Permission getPermission() {
        return HomePermissions.UC_HOME_DELHOME_BASE;
    }

    @Override
    public List<Permission> getPermissions() {
        return Arrays.asList(HomePermissions.UC_HOME_DELHOME_BASE);
    }

    @Override
    public CommandElement[] getArguments() {
        return new CommandElement[]{
                Arguments.builder(new HomeArgument(Text.of("home"))).onlyOne().build()
        };
    }

    @Override
    public CommandResult execute(CommandSource sender, CommandContext args) throws CommandException {
        checkIfPlayer(sender);
        checkPermission(sender, HomePermissions.UC_HOME_DELHOME_BASE);
        Player p = (Player) sender;
        Home home = args.<Home>getOne("home").get();

        UltimateUser user = UltimateCore.get().getUserService().getUser(p);
        List<Home> homes = user.get(HomeKeys.HOMES).orElse(new ArrayList<>());
        homes.remove(home);
        user.offer(HomeKeys.HOMES, homes);

        Messages.send(sender, "home.command.delhome.success", "%home%", home.getName());
        return CommandResult.success();
    }
}


text:
package org.msbotframework4j.connector;

import com.mashape.unirest.http.ObjectMapper;
import com.mashape.unirest.http.Unirest;

import org.msbotframework4j.core.json.SerializerFacade;
import org.msbotframework4j.logging.BotLogger;

/**
 * Factory class for BotConnector Clients
 *
 * @author Maksim Kanev
 */
public class BotConnectorClientFactory {

  private final String API_VERSION_1_0 = "v1.0";

  private BotConnectorClientFactory() {
    Unirest.setObjectMapper(new ObjectMapper() {
      @Override
      public <T> T readValue(String s, Class<T> aClass) {
        return SerializerFacade.fromJsonString(aClass, s);
      }

      @Override
      public String writeValue(Object o) {
        return SerializerFacade.toJsonString(o.getClass(), o);
      }
    });
  }

  /**
   * Returns an instance of asynchronous client for BotConnector REST API v1.0
   *
   * @param logger    {@link BotLogger} instance
   * @param appId     bot's appId
   * @param appSecret bot's appSecret
   * @return {@link BotConnectorClientAsync} instance
   */
  public BotConnectorClient getAsyncClientV1(BotLogger logger, String appId, String appSecret) {
    return new BotConnectorClientAsync(logger, API_VERSION_1_0, appId, appSecret);
  }

  /**
   * Returns singleton instance of {@link BotConnectorClientFactory}
   *
   * @return {@link BotConnectorClientFactory} instance
   */
  public static BotConnectorClientFactory getInstance() {
    return BotConnectorClientFactoryInstanceHolder.INSTANCE;
  }

  private static class BotConnectorClientFactoryInstanceHolder {

    static final BotConnectorClientFactory INSTANCE = new BotConnectorClientFactory();
  }

}


text:
<?php

/**
 * Comment filter form base class.
 *
 * @package    sf_sandbox
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseCommentFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'content_id'   => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Content'), 'add_empty' => true)),
      'name'         => new sfWidgetFormFilterInput(),
      'email'        => new sfWidgetFormFilterInput(),
      'comment_text' => new sfWidgetFormFilterInput(),
      'created_by'   => new sfWidgetFormFilterInput(),
      'created_at'   => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'updated_at'   => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
    ));

    $this->setValidators(array(
      'content_id'   => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Content'), 'column' => 'id')),
      'name'         => new sfValidatorPass(array('required' => false)),
      'email'        => new sfValidatorPass(array('required' => false)),
      'comment_text' => new sfValidatorPass(array('required' => false)),
      'created_by'   => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'created_at'   => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'updated_at'   => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('comment_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Comment';
  }

  public function getFields()
  {
    return array(
      'id'           => 'Number',
      'content_id'   => 'ForeignKey',
      'name'         => 'Text',
      'email'        => 'Text',
      'comment_text' => 'Text',
      'created_by'   => 'Number',
      'created_at'   => 'Date',
      'updated_at'   => 'Date',
    );
  }
}


text:
package com.silverforge.elasticsearchrawclient.elasticFacade;

import android.text.TextUtils;

import com.silverforge.elasticsearchrawclient.model.BulkActionResult;
import com.silverforge.elasticsearchrawclient.model.BulkTuple;
import com.silverforge.elasticsearchrawclient.model.ElasticSettings;
import com.silverforge.elasticsearchrawclient.elasticFacade.operations.BulkOperations;
import com.silverforge.elasticsearchrawclient.elasticFacade.operations.DocumentOperations;
import com.silverforge.elasticsearchrawclient.elasticFacade.operations.IndexOperations;
import com.silverforge.elasticsearchrawclient.elasticFacade.operations.QueryOperations;
import com.silverforge.elasticsearchrawclient.exceptions.IndexCannotBeNullException;
import com.silverforge.elasticsearchrawclient.exceptions.TypeCannotBeNullException;
import com.silverforge.elasticsearchrawclient.definition.Queryable;
import com.silverforge.webconnector.EndpointConnector;
import com.silverforge.webconnector.definitions.Connectable;
import com.silverforge.webconnector.exceptions.SettingsIsNullException;
import com.silverforge.webconnector.model.ConnectorSettings;
import com.silverforge.webconnector.model.InvokeStringResult;

import java.net.URISyntaxException;
import java.util.List;

import rx.Observable;

public class ElasticClient
		implements ElasticRawClient {

    private Connectable connector;
	private Raw raw = new Raw();
	private ElasticSettings elasticSettings;
    private IndexOperations indexOperations;
    private DocumentOperations documentOperations;
    private BulkOperations bulkOperations;
    private QueryOperations queryOperations;

    // region Constructors

	/**
	 * Constructor of ElasticClient
	 * @param connector the Connector instance
	 */
	public ElasticClient(Connectable connector, ElasticSettings elasticSettings) {
		this.connector = connector;
		this.elasticSettings = elasticSettings;
		indexOperations = new IndexOperations(connector, elasticSettings);
        documentOperations = new DocumentOperations(connector, elasticSettings);
        bulkOperations = new BulkOperations(connector, elasticSettings);
        queryOperations = new QueryOperations(connector, elasticSettings);
    }

	/**
	 * Constructor of ElasticClient
	 *

     *
	 *ConnectorSettings settings = ConnectorSettings
	 *    .builder()
	 *    .baseUrl(ELASTIC_URL)
	 *    .types(ELASTIC_TYPES)
	 *    .userName(ELASTIC_APIKEY)
	 *    .build();
	 *
	 *ElasticSettings elasticSettings = ElasticSettings
	 *    .builder()
	 *    .indices(ELASTIC_INDICES)
	 *    .build();
	 *
	 *    try {
	 *        client = new ElasticClient(settings);
	 *    } catch (URISyntaxException e) {
	 *        e.printStackTrace();
	 *        Log.e(TAG, e.getMessage());
	 *        fail(e.getMessage());
	 *    }
     *
	 *

	 * @param settings the settings of the ElasticClient
	 * @throws URISyntaxException
	 */
	public ElasticClient(ConnectorSettings settings, ElasticSettings elasticSettings)
			throws SettingsIsNullException, URISyntaxException {
        this(new EndpointConnector(settings), elasticSettings);
	}

	/**
	 * Constructor of ElasticClient
	 *

     *
	 *ConnectorSettings settings = ConnectorSettings
	 *    .builder()
	 *    .baseUrl(ELASTIC_URL)
	 *    .types(ELASTIC_TYPES)
	 *    .userName(ELASTIC_APIKEY)
	 *    .build();
	 *
	 *    try {
	 *        client = new ElasticClient(settings);
	 *    } catch (URISyntaxException e) {
	 *        e.printStackTrace();
	 *        Log.e(TAG, e.getMessage());
	 *        fail(e.getMessage());
	 *    }
     *
	 *

	 * @param settings the settings of the ElasticClient
	 * @throws URISyntaxException
	 */
	public ElasticClient(ConnectorSettings settings)
			throws SettingsIsNullException, URISyntaxException {
        this(new EndpointConnector(settings), ElasticSettings.builder().build());
	}

    // endregion

    /**
     * Proxy method for connector in order to have "raw" access to ElasticSearch
     */
    public Raw executeRawRequest() {
        return raw;
    }

    // region Index operations

	/**
	 * Creates index based on indexName and the data
	 * @param indexName the name of the index
	 * @param data the json string defines structure of the index for example
	 *

     *{@code
	 * {
	 *   "mappings" : {
	 *     "testcity" : {
	 *       "properties" : {
	 *         "name" : { "type": "string"}
	 *       }
	 *     }
	 *   }
	 * }
	 *}
     *

	 * @return true : if success
	 */
	@Override
	public boolean createIndex(String indexName, String data) {
		return indexOperations.createIndex(indexName, data);
	}

	/**
	 * Adds alias to an index
	 * @param indexName the index name, it could be a group as well e.g.: "testind*"
	 * @param aliasName the alias
	 */
	@Override
	public void addAlias(String indexName, String aliasName) {
        indexOperations.addAlias(indexName, aliasName);
	}

	/**
	 * Removes all the indices defined in the ConnectorSettings
	 */
	@Override
	public void removeIndices() {
		removeIndices(elasticSettings.getIndices());
	}

	/**
	 * Removes all indices given by parameter
	 * @param indexNames the indices
	 */
	@Override
	public void removeIndices(String[] indexNames) {
        indexOperations.removeIndices(indexNames);
	}

	/**
	 * Checks if the index already exists
	 * @param indexName The name of the index
	 * @return true if exists
	 */
	@Override
	public boolean indexExists(String indexName) {
        return indexOperations.indexExists(indexName);
	}

	/**
	 * Retrieves the aliases of the given index
	 * @param index the index
	 * @return List of aliases
	 */
	@Override
	public List<String> getAliases(String index) {
        return indexOperations.getAliases(index);
	}

	/**
	 * Removes alias from index
	 * @param indexName the index name
	 * @param aliasName the alias name
	 */
	@Override
	public void removeAlias(String indexName, String aliasName) {
        indexOperations.removeAlias(indexName, aliasName);
	}

    // endregion

    // region Add document operations

	/**
	 * Adds a document to the index defined in ConnectorSettings
	 * @param entity the entity should be added to index (will be json serialized)
     * @param <T> the type of the entity
	 * @return the id of the newly created document
	 * @throws IndexCannotBeNullException
	 * @throws IllegalArgumentException
	 * @throws TypeCannotBeNullException
	 */
	@Override
	public <T> String addDocument(T entity)
			throws IndexCannotBeNullException, IllegalArgumentException, TypeCannotBeNullException {

		return addDocument(null, entity);
	}

	/**
	 * Adds a document to the index defined in ConnectorSettings
	 * @param id the id of the document
	 * @param entity the entity should be added to index (will be json serialized)
	 * @param <T> the type of the entity
	 * @return the id of the newly created document
	 * @throws IndexCannotBeNullException
	 * @throws IllegalArgumentException
	 * @throws TypeCannotBeNullException
	 */
	@Override
	public <T> String addDocument(String id, T entity)
			throws IndexCannotBeNullException, IllegalArgumentException, TypeCannotBeNullException {

        return documentOperations.addDocument(id, entity);
	}

	/**
	 * Adds a document to the index, in case of IOException empty id will be retrieved
	 * @param index the index (Elastic)
	 * @param type the type of the document (Elastic)
	 * @param id the id of the document
	 * @param entity the entity
	 * @param <T> the type of the entity
	 * @return the id of the newly created document, it's equal to the param id
	 * @throws IllegalArgumentException
	 */
	@Override
	public <T> String addDocument(String index, String type, String id, T entity)
			throws IllegalArgumentException {

        return documentOperations.addDocument(index, type, id, entity);
    }

    // endregion

    // region Remove document methods

	/**
	 * Removes document from index defined in ConnectorSettings based on the given id
	 * @param id the id
	 * @throws IllegalArgumentException
	 * @throws IndexCannotBeNullException
	 * @throws TypeCannotBeNullException
	 */
	@Override
	public void removeDocument(String id)
			throws IllegalArgumentException, IndexCannotBeNullException, TypeCannotBeNullException {
        documentOperations.removeDocument(id);
	}

	/**
	 * Removes document from index given by parameters
	 * @param index the index (Elastic)
	 * @param type the type (Elastic)
	 * @param id the id (Elastic)
	 * @throws IllegalArgumentException
	 */
	@Override
	public void removeDocument(String index, String type, String id)
			throws IllegalArgumentException {
        documentOperations.removeDocument(index, type, id);
	}

	/**
	 * Removes documents by query from index defined in ConnectorSettings
	 * @param query the query, e.g.:
	 *

     *{@code
	 *{
	 *  "query": {
	 *    "term": {
	 *      "name": {
	 *        "value": "myCityName"
	 *      }
	 *    }
	 *  }
	 *}
     *}
	 *

	 */
	@Override
	public void removeDocumentsQuery(String query) {
        documentOperations.removeDocumentsQuery(query);
	}

	/**
	 * Removes documents based on the given query on the given indices
	 * @param indices the indices
	 * @param types the types of the indices
	 * @param query the query, e.g.:
	 *

     *{@code
	 *{
	 *  "query": {
	 *    "term": {
	 *      "name": {
	 *        "value": "myCityName"
	 *      }
	 *    }
	 *  }
	 *}
     *}
	 *

	 */
	@Override
	public void removeDocumentsQuery(String[] indices, String[] types, String query) {
        documentOperations.removeDocumentsQuery(indices, types, query);
	}

    // endregion

    // region Update document methods

	/**
	 * Updates document based on the given parameters in index defined in ConnectorSettings
	 * @param id the id
	 * @param entity the entity (will be json serialized)
	 * @param <T> the type of the entity
	 * @throws IndexCannotBeNullException
	 * @throws TypeCannotBeNullException
	 */
	@Override
	public <T> void updateDocument(String id, T entity)
			throws IndexCannotBeNullException, TypeCannotBeNullException {
        documentOperations.updateDocument(id, entity);
	}

	/**
	 * Updates document based on the given parameters
	 * @param index the index (Elastic)
	 * @param type the type (Elastic)
	 * @param id the id of the document (Elastic)
	 * @param entity the entity (will be json serialized)
	 * @param <T> the tpe of the entity
	 * @throws IllegalArgumentException
	 */
    @Override
	public <T> void updateDocument(String index, String type, String id, T entity)
			throws IllegalArgumentException {
        documentOperations.updateDocument(index, type, id, entity);
	}

    // endregion

    // region Bulk document method

    /**
     * Bulk processor for create/update/index/delete documents
     * @param bulkItems the action items for bulk processor
     * @return the result of every single action compared with the initial bulkitem
     */
    public List<BulkActionResult> bulk(List<BulkTuple> bulkItems) {
        return bulkOperations.bulk(bulkItems);
    }

    // endregion

    // region Get document methods

	/**
	 * Retrieves with document(s) based on the given parameters
	 * @param ids the id(s) of the document(s) (Elastic)
	 * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
	 * @param <T> the type of the entity
     * @throws IndexCannotBeNullException
	 * @return List of entity/entities retrieved by the given id(s)
	 */
	@Override
	public <T> List<T> getDocument(String[] ids, Class<T> classType)
			throws IndexCannotBeNullException {

		String[] indices = elasticSettings.getIndices();
		if (indices == null || indices.length == 0)
			throw new IndexCannotBeNullException();

		return queryOperations.getDocument(indices, null, ids, classType);
	}

	/**
	 * Retrieves with document(s) based on the given parameters
	 * @param type the type of the document (Elastic)
	 * @param ids the id(s) of the document(s) (Elastic)
	 * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
	 * @param <T> the type of the entity
     * @throws IndexCannotBeNullException
	 * @return List of entity/entities retrieved by the given id(s) and type
	 */
	@Override
	public <T> List<T> getDocument(String type, String[] ids, Class<T> classType)
			throws IndexCannotBeNullException {

		String[] indices = elasticSettings.getIndices();
		if (indices == null || indices.length == 0)
			throw new IndexCannotBeNullException();

		return queryOperations.getDocument(indices, type, ids, classType);
	}

    /**
     * Retrieves with document(s) based on the given parameters
     * @param index the index name (Elastic)
     * @param type the type of the document (Elastic)
     * @param ids the id(s) of the document(s) (Elastic)
     * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
     * @param <T> the type of the entity
     * @return List of entity/entities retrieved by the given id(s) and type
     */
	@Override
	public <T> List<T> getDocument(String index, String type, String[] ids, Class<T> classType) {

		String[] indexParam = null;

		if (!TextUtils.isEmpty(index))
			indexParam = new String[] {index};

		return queryOperations.getDocument(indexParam, type, ids, classType);
	}

	/**
	 * Retrieves with document(s) based on the given parameters
     * @param indices the indices for search (Elastic)
	 * @param type the type of the document (Elastic)
	 * @param ids the id(s) of the document(s) (Elastic)
	 * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
	 * @param <T> the type of the entity
	 * @return List of entity/entities retrieved by the given id(s)
	 */
	@Override
	public <T> List<T> getDocument(String[] indices, String type, String[] ids, Class<T> classType) {
        return queryOperations.getDocument(indices, type, ids, classType);
	}

    public <T> Observable<T> getDocumentAsync(String[] ids, Class<T> classType) {
        return Observable.create(subscriber -> {
			try {
				List<T> documents = getDocument(ids, classType);
				Observable
					.from(documents)
					.subscribe(subscriber::onNext);
			} catch (IndexCannotBeNullException e) {
				subscriber.onError(e);
			} finally {
				subscriber.onCompleted();
			}
		});
    }

    public <T> Observable<T> getDocumentAsync(String type, String[] ids, Class<T> classType) {
        return Observable.create(subscriber -> {
            try {
                List<T> documents = getDocument(type, ids, classType);
                Observable
                    .from(documents)
                    .subscribe(subscriber::onNext);
            } catch (IndexCannotBeNullException e) {
                subscriber.onError(e);
            } finally {
                subscriber.onCompleted();
            }
        });
    }

    public <T> Observable<T> getDocumentAsync(String index, String type, String[] ids, Class<T> classType) {
        return Observable.create(subscriber -> {
            try {
                List<T> documents = getDocument(index, type, ids, classType);
                Observable
                    .from(documents)
                    .subscribe(subscriber::onNext);
            } catch (Exception e) {
                subscriber.onError(e);
            } finally {
                subscriber.onCompleted();
            }
        });
    }

    public <T> Observable<T> getDocumentAsync(String[] indices, String type, String[] ids, Class<T> classType) {
        return Observable.create(subscriber -> {
            try {
                List<T> documents = getDocument(indices, type, ids, classType);
                Observable
                        .from(documents)
                        .subscribe(subscriber::onNext);
            } catch (Exception e) {
                subscriber.onError(e);
            } finally {
                subscriber.onCompleted();
            }
        });
    }

    // endregion

    // region Search methods

	/**
	 * Searches in index based on the query and retrieves with the list of entities from index defined in ConnectorSettings
	 * @param query the query, e.g.:
	 *

     *{@code
	 *{
	 *  "query": {
	 *    "match_all": {}
	 *  }
	 *}
     *}
	 *

	 * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
	 * @param <T> the type of the entity
	 * @return List of entity/entities retrieved by query
	 * @return List of entity/entities retrieved by query
	 *
	 * @deprecated in v2.0
	 * @see #search(Queryable, Class <T>)
	 */
	@Override
	public <T> List<T> search(String query, Class<T> classType) {
        return queryOperations.search(query, classType);
	}

	/**
	 * Searches in index based on the query and retrieves with the list of entities
	 * @param index the index
	 * @param query the query, e.g.:
	 *

     *{@code
	 *{
	 *  "query": {
	 *    "match_all": {}
	 *  }
	 *}
     *}
	 *

	 * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
	 * @param <T> the type of the entity
     * @throws IllegalArgumentException
	 * @return List of entity/entities retrieved by query
	 *
	 * @deprecated in v2.0
	 * @see #search(String, Queryable, Class <T>)
	 */
	@Override
	public <T> List<T> search(String index, String query, Class<T> classType)
            throws IllegalArgumentException{
        return queryOperations.search(index, query, classType);
	}

    /**
     * Searches in index based on the query and retrieves with the data sequenc of entities from index defined in ConnectorSettings
     * @param query the query, e.g.:
     *

     *{@code
     *{
     *  "query": {
     *    "match_all": {}
     *  }
     *}
     *}
     *

     * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
     * @param <T> the type of the entity
     * @return List of entity/entities retrieved by query
	 * @return List of entity/entities retrieved by query
	 *
	 * @deprecated in v2.0
	 * @see #searchAsync(Queryable, Class <T>)
     */
    public <T> Observable<T> searchAsync(String query, Class<T> classType) {
        return Observable.create(subscriber -> {
            try {
                List<T> searchResult = search(query, classType);
                Observable
                    .from(searchResult)
                    .subscribe(subscriber::onNext);
            } catch (Exception e) {
                subscriber.onError(e);
            } finally {
                subscriber.onCompleted();
            }
        });
    }

	/**
     * Searches in index based on the query and retrieves with the data sequence of entities
     * @param index the index
     * @param query the query, e.g.:
     *

     *{@code
     *{
     *  "query": {
     *    "match_all": {}
     *  }
     *}
     *}
     *

     * @param classType the type of the entity will be retrieved for mapping, e.g.: City.class
     * @param <T> the type of the entity
     * @throws IllegalArgumentException check onError
     * @return List of entity/entities retrieved by query
	 *
	 * @deprecated in v2.0
	 * @see #searchAsync(String, Queryable, Class <T>)
     */
    public <T> Observable<T> searchAsync(String index, String query, Class<T> classType) {
        return Observable.create(subscriber -> {
			if (TextUtils.isEmpty(index)) {
				IllegalArgumentException illegalArgumentException = new IllegalArgumentException("index cannot be null or empty");
				subscriber.onError(illegalArgumentException);
				subscriber.onCompleted();
			} else {
				try {
					List<T> searchResult = search(index, query, classType);
					Observable
						.from(searchResult)
						.subscribe(subscriber::onNext);

				} catch (Exception e) {
					subscriber.onError(e);
				} finally {
					subscriber.onCompleted();
				}
			}
		});
    }

	public <T> List<T> search(Queryable query, Class<T> classType) {
		return queryOperations.search(query, classType);
	}

	public <T> List<T> search(String index, Queryable query, Class<T> classType) {
		return queryOperations.search(index, query, classType);
	}

	public <T> Observable<T> searchAsync(Queryable query, Class<T> classType) {
		return Observable.create(subscriber -> {
			try {
				List<T> searchResult = queryOperations.search(query, classType);
				Observable
					.from(searchResult)
					.subscribe(subscriber::onNext);
			} catch (Exception e) {
				subscriber.onError(e);
			} finally {
				subscriber.onCompleted();
			}
		});
	}

	public <T> Observable<T> searchAsync(String index, Queryable query, Class<T> classType) {
		return Observable.create(subscriber -> {
			if (TextUtils.isEmpty(index)) {
				IllegalArgumentException illegalArgumentException = new IllegalArgumentException("index cannot be null or empty");
				subscriber.onError(illegalArgumentException);
				subscriber.onCompleted();
			} else {
				try {
					List<T> searchResult = queryOperations.search(index, query, classType);
					Observable
						.from(searchResult)
						.subscribe(subscriber::onNext);

				} catch (Exception e) {
					subscriber.onError(e);
				} finally {
					subscriber.onCompleted();
				}
			}
		});
	}

	// endregion

	/**
	 * Proxy class for connector in order to have "raw" access to ElasticSearch
	 */
	public final class Raw {

		private Raw() {}

		/**
		 * HTTP method HEAD on given path. The url is defined in ConnectorSettings
		 * @param path the path, e.g.: /apple/pear/1
		 * @return the result of the invoke
		 */
		public InvokeStringResult head(String path) {
			return connector.head(path);
		}

		/**
		 * HTTP method GET on given path. The url is defined in ConnectorSettings
		 * @param path the path, e.g.: /apple/pear/1
		 * @return the result of the invoke
		 */
		public InvokeStringResult get(String path) {
			return connector.get(path);
		}

		/**
		 * HTTP method POST on given path. The url is defined in ConnectorSettings
		 * @param path the path, e.g.: /apple/pear/1
		 * @param data the request data
		 * @return the result of the invoke
		 */
		public InvokeStringResult post(String path, String data) {
			return connector.post(path, data);
		}

		/**
		 * HTTP method PUT on given path. The url is defined in ConnectorSettings
		 * @param path the path, e.g.: /apple/pear/1
		 * @param data the request data
		 * @return the result of the invoke
		 */
		public InvokeStringResult put(String path, String data) {
			return connector.put(path, data);
		}

		/**
		 * HTTP method DELETE on given path. The url is defined in ConnectorSettings
		 * @param path the path, e.g.: /apple/pear/1
		 * @param data the request data
		 * @return the result of the invoke
		 */
		public InvokeStringResult delete(String path, String data) {
			return connector.delete(path, data);
		}
	}
}


text:
describe('OnlyDigits Test', function() {

  var element;

  beforeEach(module('angularUtils.digitsOnly'));
  beforeEach(function() {
    element = prepareElement('<input ng-model="field" digits-only>');
  });

  it('should accept only digits', function() {
    element.val('0Aa1b.;2-,3456789?');
    element.trigger('input');
    expect(element.val()).toBe('0123456789');
  });

});


text:
require 'mv/core/validation/builder/factory'

module Mv
  module Core
    module Constraint
      module Builder
        class Base
          attr_reader :constraint

          delegate :name, to: :constraint

          def initialize(constraint)
            @constraint = constraint
          end

          def create
          end

          def delete
          end

          def update new_constraint_builder
          end

          def self.validation_builders_factory
            @validation_builders_factory ||= Mv::Core::Validation::Builder::Factory.new
          end

          def validation_builders
            @validation_builders ||= constraint.validations.collect do |validation|
              self.class.validation_builders_factory.create_builder(validation)
            end
          end

          protected

          def db
            ::ActiveRecord::Base.connection
          end
        end
      end
    end
  end
end


text:
package Circle;

public class CircleTest {
   public static void main(String[] args) {

      Circle c1 = new Circle();
      System.out.println("The circle has radius of "
         + c1.getRadius() + " and area of " + c1.getArea());
      Circle c2 = new Circle(2.0 , "Verde");
      System.out.println("The circle has radius of "
         + c2.getRadius() + " and area of " + c2.getArea());

      //3  public vs. private: In TestCircle, can you access the instance variable radius directly
      //(e.g., System.out.println(c1.radius)); or assign a new value to radius (e.g., c1.radius=5.0)?
      //Try it out and explain the error messages.
      // El Error esta en que las variables son privadas.

      Circle c3 = new Circle();   // construct an instance of Circle
      c3.setRadius(5.0);          // change radius
      c3.setColor("Blue");           // change color

   Circle c4 = new Circle(5.0 , "Red");
   System.out.println(c4.toString());

   Circle c6 = new Circle(1.2);
   System.out.println(c6.toString());  // explicit call
   System.out.println(c6);             // println() calls toString() implicitly, same as above
   System.out.println("Operator '+' invokes toString() too: " + c6);  // '+' invokes toString() too
   }
}


text:
namespace Microsoft.Azure.Management.StorSimple1200Series
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Microsoft.Rest.Azure.OData;
    using Models;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for FileSharesOperations.
    /// </summary>
    public static partial class FileSharesOperationsExtensions
    {
            /// <summary>
            /// Retrieves all the file shares in a file server.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static IEnumerable<FileShare> ListByFileServer(this IFileSharesOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName)
            {
                return operations.ListByFileServerAsync(deviceName, fileServerName, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves all the file shares in a file server.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<FileShare>> ListByFileServerAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListByFileServerWithHttpMessagesAsync(deviceName, fileServerName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Returns the properties of the specified file share name.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static FileShare Get(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName)
            {
                return operations.GetAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Returns the properties of the specified file share name.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<FileShare> GetAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Creates or updates the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='fileShare'>
            /// The file share.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static FileShare CreateOrUpdate(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, FileShare fileShare, string resourceGroupName, string managerName)
            {
                return operations.CreateOrUpdateAsync(deviceName, fileServerName, shareName, fileShare, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='fileShare'>
            /// The file share.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<FileShare> CreateOrUpdateAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, FileShare fileShare, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(deviceName, fileServerName, shareName, fileShare, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share Name
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static void Delete(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName)
            {
                operations.DeleteAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share Name
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.DeleteWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

            /// <summary>
            /// Gets the file share metrics
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='odataQuery'>
            /// OData parameters to apply to the operation.
            /// </param>
            public static IEnumerable<Metrics> ListMetrics(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, ODataQuery<MetricFilter> odataQuery = default(ODataQuery<MetricFilter>))
            {
                return operations.ListMetricsAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, odataQuery).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Gets the file share metrics
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='odataQuery'>
            /// OData parameters to apply to the operation.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<Metrics>> ListMetricsAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, ODataQuery<MetricFilter> odataQuery = default(ODataQuery<MetricFilter>), CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListMetricsWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, odataQuery, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieves metric definitions of all metrics aggregated at the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static IEnumerable<MetricDefinition> ListMetricDefinition(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName)
            {
                return operations.ListMetricDefinitionAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves metric definitions of all metrics aggregated at the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<MetricDefinition>> ListMetricDefinitionAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListMetricDefinitionWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Retrieves all the file shares in a device.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static IEnumerable<FileShare> ListByDevice(this IFileSharesOperations operations, string deviceName, string resourceGroupName, string managerName)
            {
                return operations.ListByDeviceAsync(deviceName, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Retrieves all the file shares in a device.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IEnumerable<FileShare>> ListByDeviceAsync(this IFileSharesOperations operations, string deviceName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListByDeviceWithHttpMessagesAsync(deviceName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Creates or updates the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='fileShare'>
            /// The file share.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static FileShare BeginCreateOrUpdate(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, FileShare fileShare, string resourceGroupName, string managerName)
            {
                return operations.BeginCreateOrUpdateAsync(deviceName, fileServerName, shareName, fileShare, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Creates or updates the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share name.
            /// </param>
            /// <param name='fileShare'>
            /// The file share.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<FileShare> BeginCreateOrUpdateAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, FileShare fileShare, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(deviceName, fileServerName, shareName, fileShare, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// Deletes the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share Name
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            public static void BeginDelete(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName)
            {
                operations.BeginDeleteAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName).GetAwaiter().GetResult();
            }

            /// <summary>
            /// Deletes the file share.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='deviceName'>
            /// The device name.
            /// </param>
            /// <param name='fileServerName'>
            /// The file server name.
            /// </param>
            /// <param name='shareName'>
            /// The file share Name
            /// </param>
            /// <param name='resourceGroupName'>
            /// The resource group name
            /// </param>
            /// <param name='managerName'>
            /// The manager name
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteAsync(this IFileSharesOperations operations, string deviceName, string fileServerName, string shareName, string resourceGroupName, string managerName, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.BeginDeleteWithHttpMessagesAsync(deviceName, fileServerName, shareName, resourceGroupName, managerName, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

    }
}


text:
package org.finra.jtaf.core.plugins.execution;

/**
 * This is the interface to be used for Test Execution plugins
 */
public interface ITestRunnerPlugin {

	/**
	 * Called before every test starts
	 * @param ctx
	 * @throws RunnerPluginException
	 */
	void handleTestStart(TestRunnerPluginContext ctx) throws RunnerPluginException;

	/**
	 * Called after every test finishes
	 * @param ctx
	 * @throws RunnerPluginException
	 */
	void handleTestFinish(TestRunnerPluginContext ctx) throws RunnerPluginException;

}


text:
package javasmmr.zoowsome.models.animals;

public class Goldfish extends Aquatic {
	private static long counter;
	private final long id = counter++;

	public Goldfish() {
		super(0.5, 0);
		setName("Goldfish" + id);
		setNrOfLegs(0);
		setAvgSwimDepth(1);
		setWaterType(WaterType.FRESHWATER);
	}

	public Goldfish(String name) {
		super(0.5, 0);
		setName(name);
		setNrOfLegs(0);
		setAvgSwimDepth(1);
		setWaterType(WaterType.FRESHWATER);
	}

	public Goldfish(int legs, int depth, WaterType water) {
		super(0.5, 0);
		setName("Goldfish" + id);
		setNrOfLegs(legs);
		setAvgSwimDepth(depth);
		setWaterType(water);
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>OnlineBookstore</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <context-param>
    <param-name>log4j2-config-location</param-name>
    <param-value>WEB-INF/log4j2.xml</param-value>
  </context-param>
  <listener>
    <listener-class>onlinebookstore.util.Log4jContextListener</listener-class>
  </listener>
  <resource-ref>
    <description>DB Connection Pool</description>
    <res-ref-name>jdbc/OBS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
  </resource-ref>
</web-app>


text:
from lxml import html
import requests
import itertools

response = requests.get('http://packtpub.com/')
tree = html.fromstring(response.content)
#Create the list of Books:
books = tree.xpath('//div[@class="book-block-title"]/text()')

print books


text:
"""Example writing to and reading from a subprocess at the same time using
tasks."""

import trollius as asyncio
import os
from trollius import From
from trollius.subprocess import PIPE
from trollius.py33_exceptions import BrokenPipeError, ConnectionResetError

@asyncio.coroutine
def send_input(writer, input):
    try:
        for line in input:
            print('sending %s bytes' % len(line))
            writer.write(line)
            d = writer.drain()
            if d:
                print('pause writing')
                yield From(d)
                print('resume writing')
        writer.close()
    except BrokenPipeError:
        print('stdin: broken pipe error')
    except ConnectionResetError:
        print('stdin: connection reset error')

@asyncio.coroutine
def log_errors(reader):
    while True:
        line = yield From(reader.readline())
        if not line:
            break
        print('ERROR', repr(line))

@asyncio.coroutine
def read_stdout(stdout):
    while True:
        line = yield From(stdout.readline())
        print('received', repr(line))
        if not line:
            break

@asyncio.coroutine
def start(cmd, input=None, **kwds):
    kwds['stdout'] = PIPE
    kwds['stderr'] = PIPE
    if input is None and 'stdin' not in kwds:
        kwds['stdin'] = None
    else:
        kwds['stdin'] = PIPE
    proc = yield From(asyncio.create_subprocess_shell(cmd, **kwds))

    tasks = []
    if input is not None:
        tasks.append(send_input(proc.stdin, input))
    else:
        print('No stdin')
    if proc.stderr is not None:
        tasks.append(log_errors(proc.stderr))
    else:
        print('No stderr')
    if proc.stdout is not None:
        tasks.append(read_stdout(proc.stdout))
    else:
        print('No stdout')

    if tasks:
        # feed stdin while consuming stdout to avoid hang
        # when stdin pipe is full
        yield From(asyncio.wait(tasks))

    exitcode = yield From(proc.wait())
    print("exit code: %s" % exitcode)

def main():
    if os.name == 'nt':
        loop = asyncio.ProactorEventLoop()
        asyncio.set_event_loop(loop)
    else:
        loop = asyncio.get_event_loop()
    loop.run_until_complete(start(
        'sleep 2; wc', input=[b'foo bar baz\n'*300 for i in range(100)]))
    loop.close()

if __name__ == '__main__':
    main()


text:
title:  Panurirang Na Balisaon
date:  11/09/2021
---

### Namardomu tu parsiajaran di minggu on, jahama
Jona 1:4; Yer 25:5; Yeh 14:6; Pgk 2:5; Luk 9:51-56; Jud 1-25.

>
Ayat Siapilon

> "Baliksa pala ahu, tung so marasi ni roha ahu mida Ninive, * huta na bolon i, na marisi lobi saratus duapulu ribu jolma, angka na so umboto parsirangan ni siamunna dohot sihambirangna, tole pinahan na sai deak?" (Jona 4:11).

Sada kisah na manarik sian Bibel. Pastima kisah ni si Jona. Dison ma ibana, sahalak panurirang ni Debata, sahalak naung dijou Debata, alai, aha? Ibana lari sian panjouon ni Debata. Baru, dung dianju secara dramatis na laho mangubah pikkiran na na laho mangoloi Debata, ibana mangulahonsa, alai muse na holan mangulahon aha? Marungutngut tu halak naung dijou ibana na laho gabe songon sitindangi martobat siang angka dosa na dohot malua sian hasesego alani dosa i.

Songon na gabe sada contoh tu angka naso tenang, ndang dame- bahkan sampe tu titik didia ibana marsurak "on  pe ale Jahowa, ua buat ma tagonan hosangku sian ahu, ai dengganan ahu mate sian na mangolu" Jona 4:3.

Yesus sandiri mamereng sian kisah ni si Jona on, na mandokhon, "Na hehe do sogot halak Ninive di paruhuman i dompak bangso na sansundut on, mangkonahon uhum tusi, ai dipauba do roha nasida, umbege jamita ni si Jonas. Jala ida ma, On do na sumurung sian si Jona i! ( Mat 12:41) lobi humebat sian si Jona. Molo ndang, Ibana ndang gabe sipaluan ta.

Minggu on idaon ta ma gumodang jala parsiajaran ta sian si Jona taringot tu balisaon dohot hurang na hadameon.

_*Parsiajarima parsiajaran samingguon na laho paradehon tu ari sabat, 18 September_