text:
title:  "Sailing Practice + SoCal1 Results"
date:             2019-09-15 18:00:00 -0700
last_modified_at: 2019-10-10 12:00:00 -0700
modified_count: 1
title_alert: "Sailing Practice Starts Friday 9/20"
categories: [ 2019-20, pcisa ]

photo1: 2019socal1-win
photo2:

signup-emoji: ":triangular_flag_on_post:"
signup: "https://docs.google.com/forms/d/e/1FAIpQLSePOXdW--1sn6oYcNezOHPHldTjDzAE-2wFDntbsxmvjt3scw/viewform"
map:  "https://www.google.com/maps/place/Monterey+Peninsula+Yacht+Club/@36.6020501,-121.8920127,17z/data=!3m1!4b1!4m5!3m4!1s0x808de418438faccb:0x7874f873f0a478a5!8m2!3d36.6020501!4d-121.889824"
entrylist: "https://hssailing.org/machform/widget.php?key=90340xeb2ffe3c5d"
---
{% assign photo1 = site.data.widget_photos[page.photo1] %}
{% assign photo2 = site.data.widget_photos[page.photo2] %}

{% include data/widget_main_photo.html photo1=photo1 photo2=photo2 %}

<div class="alert alert-info" markdown="1">
## Amazing Season Start

If you're interested in sailing, reach out to us at school (we meet Tuesday's in Ms Saeed's room), our [Facebook Page][SatoSailingFB], or on [Instagram][SatoSailingIG]. We welcome anyone interested in sailing and willing to work at learning more about how sailing works. We're a fun welcoming club and we're off to a great start to our season in our first regatta! Two of our boats tied for first place in silver division, with a total of only 15 points each. With six races scored, that meant both boats averaged 2½ place finish. Scoring rules meant that _Nikhil Stewart (junior) & Tyler Hoang (junior)_ received the first place trophy due to the "Number of high-place (1st) finishes" over _Preston Woodworth (freshman) & Diego Lockyer (junior)._  But in the end both teams finished with trophy's and happy with their performance.

The third place boat was also from Long Beach, with 26 points, from Long Beach Wilson. Also of note, our borrowed coach, Alex Smith (CBYC), had five of the top six boats in the fleet of 17!

Third year sailor Troy Davidson skippered Sato's third boat and finished mid fleet with 12th overall. Troy was helped by new sailors Eli & Enzo rotating between races as his crew. The light wind of the day provided no favors for some of our largest sailors, which surely slowed them down compared to the <85lb eighth graders that came in third place. However, our new sailors will be indispensable and provide us balance in heavier winds.

### About Socal1

The day felt much hotter than 84°F recorded high temperature. This reflects the very light winds of the day, only 2-3MPH with gusts 4-9MPH most of the day. By 3:00p wind died to 1MPH with very occasional gusts only 3-4. With forecast to remain stagnant, the officials boat called the day early.

</div>

### First Sailing Practice at ABYC

Practice starts this week. Before you can practice, you must fill-out and turn-in ABYC Medical and Sailing Sign-up form. It was handed out at the Parent Meeting at ABYC on Wed 9/11. Alternatively, download, print, and fill-out the [Registration Packet][Register].

Friday 9/20 is the first day of practice at [ABYC (map)][ABYC]. Then, practice will be every Wednesday and Fridays after school until daylight savings ends. Full schedule will be on our [calendar](/calendar/). Let's coordinate carpooling!

## PCISA1: Sea Otter in Monterey Bay

<!--more-->
Looking forward, our next regatta requires travel and planning. Oct 12-13 is PCISA1 is hosted by Cal State University of Monterey Bay at [Monterey Peninsula Yacht Club]({{ page.map }}). We need at least five sailors to commit before we can register, but we need to register soon, as fall regattas are limited in space and can fill-up.

[//]: # (Comment: Links)

[Register]: https://drive.google.com/file/d/0B1BmCT4HlfrzRUtHcjgxelN4OWRjbTZtX2lfcHl3WnhDdWFJ/view?usp=sharing "ABYC Registration Packet"
[ABYC]:    https://www.google.com/maps/place/ABYC/@33.7608805,-118.1394092,15z/data=!4m5!3m4!1s0x0:0xd5ac006f662647e9!8m2!3d33.7459493!4d-118.1167817  "Alamitos Bay Yacht Club"
[SatoSailingIG]:   https://www.instagram.com/satosailing/      "Sato Sailing Club - Instagram Account"
[SatoSailingFB]:   https://www.facebook.com/satosailing.club/  "Sato Sailing Club - Facebook Page"


text:
<?php
/*********
* Author:Mrinmoy Mondal
* Date  : 02 Apr 2012
* Modified By:
* Modified Date:
*
* Purpose:
*  View For membership plan Add & Edit
*
* @package General
* @subpackage membership plan
*
* @link InfController.php
* @link My_Controller.php
* @link views/admin/membership_plan/
*/

?>
 <?php
    /////////Javascript For List View//////////
?>

<?php
  /////////end Javascript For List View//////////
  /****

SUCCESS!Lorem ipsum dolor sit amet, consectetur adipiscing elit.

ERROR!Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Warning!Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Information!Lorem ipsum dolor sit amet, consectetur adipiscing elit.

  */

?>

<form id="frm_add_edit" name="frm_add_edit" method="post" action="">
<input type="hidden" id="h_mode" name="h_mode" value="<?php echo $posted["h_mode"];?>">
<input type="hidden" id="h_id" name="h_id" value="<?php echo $posted["h_id"];?>">

<?php echo $heading;?>

From here admin can edit the mebership plan offers .

            <?php
              show_msg("error");
              echo validation_errors();
			/*  pr($posted);*/
            ?>

    <? /*****Modify Section Starts*******/?>

<?php echo $heading;?>

		<?php if($mode!="edit") { ?>

          Membership Type * :

		 	<select id="opt_type" name="opt_type">
				<option value="">Select</option>
				<?php echo makeOption($arr_type,$posted['opt_type']) ?>
			</select>

		<?php }
        else
        { ?>

          Membership Type * :

             <input type="text" value="<?php echo $posted['s_type']; ?>" size="28" readonly="readonly" style="font-weight: bold;">

        <?php
        } ?>

          Quotes *:

          <input id="txt_quotes" name="txt_quotes" value="<?php echo $posted["txt_quotes"];?>" type="text" size="28" />

          Contact Information *:

          <input id="txt_contact" name="txt_contact" value="<?php echo $posted["txt_contact"];?>" type="text" size="28" />

          Duration (in days) *:

          <input id="txt_duration" name="txt_duration" value="<?php echo $posted["txt_duration"];?>" type="text" size="28" />

          Price *:

          <input id="txt_price" name="txt_price" value="<?php echo $posted["txt_price"];?>" type="text" size="28" />

          Price for Additional contact information :

          <input id="txt_add_price" name="txt_add_price" value="<?php echo $posted["txt_add_price"];?>" type="text" size="28" />

    <? /***** end Modify Section *******/?>

    <input id="btn_save" name="btn_save" type="button" value="Save" title="Click here to save information." />
    <input id="btn_cancel" name="btn_cancel" type="button" value="Cancel" title="Click here to cancel saving information and return to previous page."/>

</form>

redpajama_set_name: RedPajamaGithub


text:
import pytest

from rest_framework.exceptions import PermissionDenied, ParseError
from awx.api.filters import FieldLookupBackend
from awx.main.models import (AdHocCommand, AuthToken, CustomInventoryScript,
                             Credential, Job, JobTemplate, SystemJob,
                             UnifiedJob, User, WorkflowJob,
                             WorkflowJobTemplate, WorkflowJobOptions,
                             InventorySource)
from awx.main.models.jobs import JobOptions

def test_related():
    field_lookup = FieldLookupBackend()
    lookup = '__'.join(['inventory', 'organization', 'pk'])
    field, new_lookup = field_lookup.get_field_from_lookup(InventorySource, lookup)
    print(field)
    print(new_lookup)

@pytest.mark.parametrize(u"empty_value", [u'', ''])
def test_empty_in(empty_value):
    field_lookup = FieldLookupBackend()
    with pytest.raises(ValueError) as excinfo:
        field_lookup.value_to_python(JobTemplate, 'project__name__in', empty_value)
    assert 'empty value for __in' in str(excinfo.value)

@pytest.mark.parametrize(u"valid_value", [u'foo', u'foo,'])
def test_valid_in(valid_value):
    field_lookup = FieldLookupBackend()
    value, new_lookup = field_lookup.value_to_python(JobTemplate, 'project__name__in', valid_value)
    assert 'foo' in value

def test_invalid_field():
    invalid_field = u"ヽヾ"
    field_lookup = FieldLookupBackend()
    with pytest.raises(ValueError) as excinfo:
        field_lookup.value_to_python(WorkflowJobTemplate, invalid_field, 'foo')
    assert 'is not an allowed field name. Must be ascii encodable.' in excinfo.value.message

@pytest.mark.parametrize('lookup_suffix', ['', 'contains', 'startswith', 'in'])
@pytest.mark.parametrize('password_field', Credential.PASSWORD_FIELDS)
def test_filter_on_password_field(password_field, lookup_suffix):
    field_lookup = FieldLookupBackend()
    lookup = '__'.join(filter(None, [password_field, lookup_suffix]))
    with pytest.raises(PermissionDenied) as excinfo:
        field, new_lookup = field_lookup.get_field_from_lookup(Credential, lookup)
    assert 'not allowed' in str(excinfo.value)

@pytest.mark.parametrize('lookup_suffix', ['', 'contains', 'startswith', 'in'])
@pytest.mark.parametrize('password_field', Credential.PASSWORD_FIELDS)
def test_filter_on_related_password_field(password_field, lookup_suffix):
    field_lookup = FieldLookupBackend()
    lookup = '__'.join(filter(None, ['credential', password_field, lookup_suffix]))
    with pytest.raises(PermissionDenied) as excinfo:
        field, new_lookup = field_lookup.get_field_from_lookup(JobTemplate, lookup)
    assert 'not allowed' in str(excinfo.value)

@pytest.mark.parametrize('model, query', [
    (AuthToken, 'request_hash__icontains'),
    (User, 'password__icontains'),
    (User, 'auth_tokens__key__icontains'),
    (User, 'settings__value__icontains'),
    (UnifiedJob, 'job_args__icontains'),
    (UnifiedJob, 'job_env__icontains'),
    (UnifiedJob, 'start_args__icontains'),
    (AdHocCommand, 'extra_vars__icontains'),
    (JobOptions, 'extra_vars__icontains'),
    (SystemJob, 'extra_vars__icontains'),
    (WorkflowJobOptions, 'extra_vars__icontains'),
    (Job, 'survey_passwords__icontains'),
    (WorkflowJob, 'survey_passwords__icontains'),
    (JobTemplate, 'survey_spec__icontains'),
    (WorkflowJobTemplate, 'survey_spec__icontains'),
    (CustomInventoryScript, 'script__icontains')
])
def test_filter_sensitive_fields_and_relations(model, query):
    field_lookup = FieldLookupBackend()
    with pytest.raises(PermissionDenied) as excinfo:
        field, new_lookup = field_lookup.get_field_from_lookup(model, query)
    assert 'not allowed' in str(excinfo.value)

def test_looping_filters_prohibited():
    field_lookup = FieldLookupBackend()
    with pytest.raises(ParseError) as loop_exc:
        field_lookup.get_field_from_lookup(Job, 'job_events__job__job_events')
    assert 'job_events' in str(loop_exc.value)


text:
import numpy as np
import ctypes as ct
import matplotlib.pyplot as plt
# For Python under Linux
#ADQAPI = ct.cdll.LoadLibrary("libadq.so")
# For Python under Windows
ADQAPI = ct.cdll.LoadLibrary("ADQAPI.dll")
ADQAPI.ADQAPI_GetRevision()

# Manually set return type from some ADQAPI functions
ADQAPI.CreateADQControlUnit.restype = ct.c_void_p
ADQAPI.ADQ_GetRevision.restype = ct.c_void_p
ADQAPI.ADQ_GetPtrStream.restype = ct.POINTER(ct.c_int16)
ADQAPI.ADQControlUnit_FindDevices.argtypes = [ct.c_void_p]

# Create ADQControlUnit
adq_cu = ct.c_void_p(ADQAPI.CreateADQControlUnit())
ADQAPI.ADQControlUnit_EnableErrorTrace(adq_cu, 3, '.')
adq_num = 1

# Convenience function
def adq_status(status):
    if (status==0):
        return 'FAILURE'
    else:
        return 'OK'

# Find ADQ devices
ADQAPI.ADQControlUnit_FindDevices(adq_cu)
n_of_ADQ  = ADQAPI.ADQControlUnit_NofADQ(adq_cu)
print('Number of ADQ found:  {}'.format(n_of_ADQ))

if n_of_ADQ > 0:
    # Get revision info from ADQ
    rev = ADQAPI.ADQ_GetRevision(adq_cu, adq_num)
    revision = ct.cast(rev,ct.POINTER(ct.c_int))
    print('\nConnected to ADQ #1')
    # Print revision information
    print('FPGA Revision: {}'.format(revision[0]))
    if (revision[1]):
        print('Local copy')
    else :
        print('SVN Managed')
        if (revision[2]):
            print('Mixed Revision')
        else :
            print('SVN Updated')
            print('')

    # Set clock source
    ADQ_CLOCK_INT_INTREF = 0
    ADQAPI.ADQ_SetClockSource(adq_cu, adq_num, ADQ_CLOCK_INT_INTREF);

    ##########################
    # Test pattern
    #ADQAPI.ADQ_SetTestPatternMode(adq_cu, adq_num, 4)
    ##########################
    # Sample skip
    #ADQAPI.ADQ_SetSampleSkip(adq_cu, adq_num, 1)
    ##########################

    # Set trig mode
    SW_TRIG = 1
    EXT_TRIG_1 = 2
    EXT_TRIG_2 = 7
    EXT_TRIG_3 = 8
    LVL_TRIG = 3
    INT_TRIG = 4
    LVL_FALLING = 0
    LVL_RISING = 1
    trigger = LVL_TRIG
    success = ADQAPI.ADQ_SetTriggerMode(adq_cu, adq_num, trigger)
    if (success == 0):
        print('ADQ_SetTriggerMode failed.')
    success = ADQAPI.ADQ_SetLvlTrigLevel(adq_cu, adq_num, -100)
    if (success == 0):
        print('ADQ_SetLvlTrigLevel failed.')
    success = ADQAPI.ADQ_SetTrigLevelResetValue(adq_cu, adq_num, 1000)
    if (success == 0):
        print('ADQ_SetTrigLevelResetValue failed.')
    success = ADQAPI.ADQ_SetLvlTrigChannel(adq_cu, adq_num, 1)
    if (success == 0):
        print('ADQ_SetLvlTrigChannel failed.')
    success = ADQAPI.ADQ_SetLvlTrigEdge(adq_cu, adq_num, LVL_RISING)
    if (success == 0):
        print('ADQ_SetLvlTrigEdge failed.')

    number_of_records = 1
    samples_per_record = 16384

    # Start acquisition
    ADQAPI.ADQ_MultiRecordSetup(adq_cu, adq_num,
                                number_of_records,
                                samples_per_record)
    ADQAPI.ADQ_DisarmTrigger(adq_cu, adq_num)
    ADQAPI.ADQ_ArmTrigger(adq_cu, adq_num)

    while(ADQAPI.ADQ_GetAcquiredAll(adq_cu,adq_num) == 0):
        if (trigger == SW_TRIG):
            ADQAPI.ADQ_SWTrig(adq_cu, adq_num)
        print('Waiting for trigger')

    # Setup target buffers for data
    max_number_of_channels = 4
    target_buffers=(ct.POINTER(ct.c_int16*samples_per_record*number_of_records)*max_number_of_channels)()
    for bufp in target_buffers:
        bufp.contents = (ct.c_int16*samples_per_record*number_of_records)()

    # Get data from ADQ
    ADQ_TRANSFER_MODE_NORMAL = 0
    ADQ_CHANNELS_MASK = 0xF
    status = ADQAPI.ADQ_GetData(adq_cu, adq_num, target_buffers,
                                samples_per_record*number_of_records, 2,
                                0, number_of_records, ADQ_CHANNELS_MASK,
                                0, samples_per_record, ADQ_TRANSFER_MODE_NORMAL);
    print('ADQ_GetData returned {}'.format(adq_status(status)))

    # Re-arrange data in numpy arrays
    data_16bit_ch0 = np.frombuffer(target_buffers[0].contents[0],dtype=np.int16)
    data_16bit_ch1 = np.frombuffer(target_buffers[1].contents[0],dtype=np.int16)
    data_16bit_ch2 = np.frombuffer(target_buffers[2].contents[0],dtype=np.int16)
    data_16bit_ch3 = np.frombuffer(target_buffers[3].contents[0],dtype=np.int16)

    # Plot data
    if True:
        plt.figure(1)
        plt.clf()
        plt.plot(data_16bit_ch0, '.-')
        plt.plot(data_16bit_ch1, '.--')
        plt.plot(data_16bit_ch2, '.--')
        plt.plot(data_16bit_ch3, '.--')

        plt.show()

    # Only disarm trigger after data is collected
    ADQAPI.ADQ_DisarmTrigger(adq_cu, adq_num)
    ADQAPI.ADQ_MultiRecordClose(adq_cu, adq_num);

    # Delete ADQControlunit
    ADQAPI.DeleteADQControlUnit(adq_cu);

    print('Done')

else:
    print('No ADQ connected.')

# This can be used to completely unload the DLL in Windows
#ct.windll.kernel32.FreeLibrary(ADQAPI._handle)


text:
var Batch = require('batch');
var debounce = require('debounce');
var geocode = require('geocode');
var Journey = require('journey');

var log = require('./client/log')('plan');
var defaults = require('model-defaults');
var model = require('model');
var ProfileQuery = require('profile-query');
var ProfileScorer = require('otp-profile-score');
var qs = require('querystring');

var loadPlan = require('./load');
var store = require('./store');
var updateRoutes = require('./update-routes');

module.exports.dataplan = [];
/**
 * Debounce updates to once every 50ms
 */

var DEBOUNCE_UPDATES = 5;
var LIMIT = 2;

/**
 * Expose `Plan`
 */

var Plan = module.exports = model('Plan')
  .use(defaults({
    bike: true,
    bikeShare: false,
    bus: true,
    car: false,
    days: 'M—F',
    end_time: (new Date()).getHours() + 4,
    from: '',
    from_valid: false,
    loading: true,
    options: [],
    dataplan: [],
    query: new ProfileQuery(),
    scorer: new ProfileScorer(),
    start_time: (new Date()).getHours() - 1,
    to: '',
    to_valid: false,
    train: true,
    tripsPerYear: 235,
    walk: true
  }))
  .attr('bike')
  .attr('bikeShare')
  .attr('bus')
  .attr('car')
  .attr('days')
  .attr('end_time')
  .attr('from')
  .attr('from_id')
  .attr('from_ll')
  .attr('from_valid')
  .attr('loading')
  .attr('journey')
  .attr('options')
  .attr('query')
  .attr('scorer')
  .attr('start_time')
  .attr('to')
  .attr('to_id')
  .attr('to_ll')
  .attr('to_valid')
  .attr('train')
  .attr('tripsPerYear')
  .attr('walk');

/**
 * Expose `load`
 */

module.exports.load = function(ctx, next) {
  loadPlan(Plan, ctx, next);
};

/**
 * Sync plans with localStorage
 */

Plan.on('change', function(plan, name, val) {
  log('plan.%s changed to %s', name, val);

  // Store in localStorage & track the change
  if (name !== 'options' && name !== 'journey' && name !== 'loading') plan.store();
});

/**
 * Keep start/end times in sync
 */

Plan.on('change start_time', function(plan, val, prev) {
  if (val >= plan.end_time()) plan.end_time(val + 1);
});

Plan.on('change end_time', function(plan, val, prev) {
  if (val <= plan.start_time()) plan.start_time(val - 1);
});

/**
 * Update routes. Restrict to once every 25ms.
 */

Plan.prototype.updateRoutes = debounce(function(opts, callback) {
  updateRoutes(this, opts, callback);
  this.dataplan = updateRoutes.dataplan;
}, DEBOUNCE_UPDATES);

/**
 * Geocode
 */

Plan.prototype.geocode = function(dest, callback) {
  if (!callback) callback = function() {};

  var plan = this;
  var address = plan[dest]();
  var ll = plan[dest + '_ll']();
  if (address && address.length > 0) {
    geocode(address, function(err, ll) {
      if (err) {
        callback(err);
      } else {
        plan[dest + '_ll'](ll);
        callback(null, ll);
      }
    });
  } else {
    callback(null, ll);
  }
};

/**
 * Save Journey
 */

Plan.prototype.saveJourney = function(callback) {
  var opts = {};
  var skipKeys = ['options', 'journey', 'scorer'];
  for (var key in this.attrs) {
    if (skipKeys.indexOf(key) !== -1 || key.indexOf('to') === 0 || key.indexOf('from') === 0) {
      continue;
    }
    opts[key] = this.attrs[key];
  }

  // Create new journey

  var journey = new Journey({
    locations: [{
      _id: this.from_id()
    }, {
      _id: this.to_id()
    }],
    opts: opts
  });

  // Save
  journey.save(callback);
};

/**
 * Valid coordinates
 */

Plan.prototype.validCoordinates = function() {
  return this.coordinateIsValid(this.from_ll()) && this.coordinateIsValid(this.to_ll());
};

/**
 * Set Address
 */

Plan.prototype.setAddress = function(name, address, callback, extra) {
  callback = callback || function() {}; // noop callback
  var plan = this;
  var c = address.split(',');
  var isCoordinate = c.length === 2 && !isNaN(parseFloat(c[0])) && !isNaN(parseFloat(c[1]));

  if (!address || address.length < 1) return callback();

    if (isCoordinate) {

      var callbackAmigo = function (err, reverse) {
        var changes = {};
            if (reverse) {
              var geocode_features = reverse.features;
              changes[name] = name;
              if (isCoordinate) {
                if (!(extra === undefined)) {
                    changes[name] = extra.properties.label;
                }else {
                    changes[name] = geocode_features[0].properties.label;
                }

              }else {
                if (!(extra === undefined)) {
                    changes[name] = extra.properties.label;
                }else {
                    changes[name] = geocode_features[0].properties.label;
                }

              }

              changes[name + '_ll'] = {lat: parseFloat(geocode_features[0].geometry.coordinates[1]), lng: parseFloat(geocode_features[0].geometry.coordinates[0])};
              changes[name + '_id'] = geocode_features[0].properties.id;
              changes[name + '_valid'] = true;

              plan.set(changes);
              callback(null, reverse);

            } else {

              if (isCoordinate) {
                changes[name] = extra.properties.label;
                changes[name + '_ll'] = { lat: parseFloat(c[1]),lng: parseFloat(c[0])};
                changes[name + '_valid'] = true;
                plan.set(changes);
                callback(null, extra);
              } else {
                callback(err);
              }

            }
        };

        geocode.reverseAmigo(c, callbackAmigo);
    }else {
      plan.setAddress('', '', callback);
    }
};

/**
 * Set both addresses
 */

Plan.prototype.setAddresses = function(from, to, callback) {
  // Initialize the default locations
  var plan = this;

  Batch()
    .push(function(done) {
      plan.setAddress('from', from, done);
    })
    .push(function(done) {
      plan.setAddress('to', to, done);
    }).end(callback);
};

/**
 * Rescore Options
 */

Plan.prototype.rescoreOptions = function() {
  var scorer = this.scorer();
  var options = this.options();

  options.forEach(function(o) {
    o.rescore(scorer);
  });

  this.store();
};

/**
 * To Lower Case
 */

function toLowerCase(s) {
  return s ? s.toLowerCase() : '';
}

Plan.prototype.coordinateIsValid = function(c) {
  return !!c && !!parseFloat(c.lat) && !!parseFloat(c.lng) && parseFloat(c.lat) !== 0.0 && parseFloat(c.lng) !== 0.0;
};

/**
 * Modes as a CSV
 */

Plan.prototype.modesCSV = function() {
  var modes = [];
  if (this.bike()) modes.push('BICYCLE');
  if (this.bikeShare()) modes.push('BICYCLE_RENT');
  if (this.bus()) modes.push('BUSISH');
  if (this.train()) modes.push('TRAINISH');
  if (this.walk()) modes.push('WALK');
  if (this.car()) modes.push('CAR');

  return modes.join(',');
};

/**
 * Set modes from string
 */

Plan.prototype.setModes = function(csv) {
  if (!csv || csv.length < 1) return;
  var modes = csv.split ? csv.split(',') : csv;

  this.bike(modes.indexOf('BICYCLE') !== -1);
//  this.bikeShare(modes.indexOf('BICYCLE_RENT') !== -1);
  this.bikeShare(false);
  this.bus(true);
//  this.bus(modes.indexOf('BUSISH') !== -1);
  this.train(modes.indexOf('TRAINISH') !== -1);
  this.car(modes.indexOf('CAR') !== -1);
};

/**
 * Generate Query Parameters for this plan
 */

Plan.prototype.generateQuery = function() {
  var from = this.from_ll() || {};
  var to = this.to_ll() || {};

  // Transit modes
  var modes = [];//['WALK'];

  if (this.bikeShare()) modes.push('BICYCLE_RENT');

  if (this.car()) {
    modes.push('CAR');
  }
  if (this.bike()) {
    modes.push('BICYCLE');
  } else {
    modes.push('WALK');
  }
  if (this.bus()) modes.push('BUSISH');
  if (this.train()) modes.push('TRAINISH');
  if (modes.length==0) modes.push('WALK');

  var startTime = this.start_time();
  var endTime = this.end_time();
  var scorer = this.scorer();

  // Convert the hours into strings
  startTime += ':00';
  endTime = endTime === 24 ? '23:59' : endTime + ':00';

  return {
    date: this.nextDate(),
    mode: modes.join(','),
      time: startTime,
      fromPlace: (from.lat + ',' + from.lng),
      toPlace: (to.lat + ',' + to.lng),
      numItineraries: 3,
      maxWalkDistance: 20000,
      bikeSpeed: 10,
      bikeBoardCost: 15,
      walkReluctance: 10,
      clampInitialWait: 60,
//      waitAtBeginningFactor: 0.5,
      triangleSafetyFactor: 0.9,
      triangleSlopeFactor: 0.5,
      triangleTimeFactor: 0.9,
      optimize: 'QUICK'
  };
};

/**
 * Store in localStorage. Restrict this I/O to once every 25ms.
 */

Plan.prototype.store = debounce(function() {
  store(this);
}, DEBOUNCE_UPDATES);

/**
 * Clear localStorage
 */

Plan.prototype.clearStore = store.clear;

/**
 * Save URL
 */

Plan.prototype.saveURL = function() {
  window.history.replaceState(null, '', '/planner?' + this.generateQueryString());
};

/**
 * Get next date for day of the week
 */

Plan.prototype.nextDate = function() {
  var now = new Date();
  var date = now.getDate();
  var dayOfTheWeek = now.getDay();
  switch (this.days()) {
    case 'M—F':
      if (dayOfTheWeek === 0) now.setDate(date + 1);
      if (dayOfTheWeek === 6) now.setDate(date + 2);
      break;
    case 'Sat':
      now.setDate(date + (6 - dayOfTheWeek));
      break;
    case 'Sun':
      now.setDate(date + (7 - dayOfTheWeek));
      break;
  }
  return now.toISOString().split('T')[0];
};

/**
 * Generate `places` for transitive
 */

Plan.prototype.generatePlaces = function() {
  var fll = this.from_ll();
  var tll = this.to_ll();
  if (!fll || !tll) return [];

  return [{
    place_id: 'from',
    place_lat: fll.lat,
    place_lon: fll.lng,
    place_name: 'From'
  }, {
    place_id: 'to',
    place_lat: tll.lat,
    place_lon: tll.lng,
    place_name: 'To'
  }];
};

/**
 * Generate QueryString
 */

Plan.prototype.generateQueryString = function() {
  return qs.stringify({
    from: this.from(),
    to: this.to(),
    modes: this.modesCSV(),
    start_time: this.start_time(),
    end_time: this.end_time(),
    days: this.days()
  });
};


text:
package org.odlabs.wiquery.ui.slider;

import static org.junit.Assert.*;

import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.util.tester.ITestPanelSource;
import org.junit.Before;
import org.junit.Test;
import org.odlabs.wiquery.core.options.ArrayItemOptions;
import org.odlabs.wiquery.core.options.IntegerItemOptions;
import org.odlabs.wiquery.tester.WiQueryTestCase;
import org.odlabs.wiquery.ui.DivTestPanel;
import org.odlabs.wiquery.ui.core.JsScopeUiEvent;
import org.odlabs.wiquery.ui.slider.Slider.Orientation;
import org.odlabs.wiquery.ui.slider.SliderAnimate.AnimateEnum;
import org.odlabs.wiquery.ui.slider.SliderRange.RangeEnum;

/**
 * Test on {@link Slider}
 *
 * @author Julien Roche
 */
public class SliderTestCase extends WiQueryTestCase
{
	// Properties
	private Slider slider;

	@Override
	@Before
	public void setUp()
	{
		super.setUp();

		tester.startPanel(new ITestPanelSource()
		{
			private static final long serialVersionUID = 1L;

			public Panel getTestPanel(String panelId)
			{
				Panel panel = new DivTestPanel(panelId);
				slider = new Slider("anId", 5, 10);
				slider.setMarkupId(slider.getId());
				panel.add(slider);
				return panel;
			}
		});
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#destroy()}.
	 */
	@Test
	public void testDestroy()
	{
		assertNotNull(slider.destroy());
		assertEquals(slider.destroy().render().toString(), "$('#anId').slider('destroy');");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#disable()}.
	 */
	@Test
	public void testDisable()
	{
		assertNotNull(slider.disable());
		assertEquals(slider.disable().render().toString(), "$('#anId').slider('disable');");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#enable()}.
	 */
	@Test
	public void testEnable()
	{
		assertNotNull(slider.enable());
		assertEquals(slider.enable().render().toString(), "$('#anId').slider('enable');");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getMax()}.
	 */
	@Test
	public void testGetMax()
	{
		assertEquals(slider.getMax().intValue(), 10);
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getMin()}.
	 */
	@Test
	public void testGetMin()
	{
		assertEquals(slider.getMin().intValue(), 5);
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getOptions()}.
	 */
	@Test
	public void testGetOptions()
	{
		assertNotNull(slider.getOptions());
		assertEquals(slider.getOptions().getJavaScriptOptions().toString(), "{min: 5.0, max: 10.0}");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getOrientation()}.
	 */
	@Test
	public void testGetOrientation()
	{
		assertNotNull(slider.getOrientation());
		assertEquals(slider.getOrientation(), Orientation.HORIZONTAL);
		slider.setOrientation(Orientation.VERTICAL);
		assertEquals(slider.getOrientation(), Orientation.VERTICAL);
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getRange()}.
	 */
	@Test
	public void testGetRange()
	{
		assertNotNull(slider.getRange());
		assertEquals(slider.getRange().getJavascriptOption().toString(), "false");
		slider.setRange(new SliderRange(RangeEnum.MAX));
		assertEquals(slider.getRange().getJavascriptOption().toString(), "'max'");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getStep()}.
	 */
	@Test
	public void testGetStep()
	{
		assertEquals(slider.getStep(), 1);
		slider.setStep(5);
		assertEquals(slider.getStep(), 5);
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getValue()}.
	 */
	@Test
	public void testGetValue()
	{
		assertEquals(slider.getValue(), 0);
		slider.setValue(5);
		assertEquals(slider.getValue(), 5);
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#getValues()}.
	 */
	@Test
	public void testGetValues()
	{
		assertNull(slider.getValues());
		ArrayItemOptions<IntegerItemOptions> array = new ArrayItemOptions<IntegerItemOptions>();
		array.add(new IntegerItemOptions(5));
		slider.setValues(array);
		assertNotNull(slider.getValues());
		assertEquals(slider.getValues().getJavascriptOption().toString(), "[5]");
	}

	@Test
	public void testGetValues1()
	{
		assertNull(slider.getValues());
		slider.setValues(4, 5);
		assertNotNull(slider.getValues());
		assertEquals(slider.getValues().getJavascriptOption().toString(), "[4,5]");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#isAnimate()}.
	 */
	@Test
	public void testIsAnimate()
	{
		assertFalse(slider.isAnimate());
		slider.setAnimate(true);
		assertEquals(slider.isAnimate(), true);
		slider.setAnimate(1000);
		assertEquals(slider.getAnimate().getJavascriptOption(), "1000");
		slider.setAnimate(-1000);
		assertEquals(slider.getAnimate().getJavascriptOption(), "1000");
		slider.unsetAnimate();
		assertFalse(slider.isAnimate());

		slider.setAnimate(AnimateEnum.FAST);
		assertTrue(slider.isAnimate());
		assertEquals(slider.getAnimate().getJavascriptOption(), "'fast'");

		slider.setAnimate(AnimateEnum.SLOW);
		assertTrue(slider.isAnimate());
		assertEquals(slider.getAnimate().getJavascriptOption(), "'slow'");

		slider.setAnimate(AnimateEnum.NORMAL);
		assertTrue(slider.isAnimate());
		assertEquals(slider.getAnimate().getJavascriptOption(), "'normal'");

	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#isDisabled()}.
	 */
	@Test
	public void testIsDisabled()
	{
		assertFalse(slider.isDisabled());
		slider.setDisabled(true);
		assertTrue(slider.isDisabled());
	}

	/**
	 * Test method for
	 * {@link org.odlabs.wiquery.ui.slider.Slider#setChangeEvent(org.odlabs.wiquery.ui.core.JsScopeUiEvent)}
	 * .
	 */
	@Test
	public void testSetChangeEvent()
	{
		assertEquals(slider.statement().render().toString(),
			"$('#anId').slider({min: 5.0, max: 10.0});");
		slider.setChangeEvent(JsScopeUiEvent.quickScope("alert('event');"));
		assertTrue(slider.statement().render().toString()
			.contains("change: function(event, ui) {\n\talert('event');\n}"));
	}

	/**
	 * Test method for
	 * {@link org.odlabs.wiquery.ui.slider.Slider#setSlideEvent(org.odlabs.wiquery.ui.core.JsScopeUiEvent)}
	 * .
	 */
	@Test
	public void testSetSlideEvent()
	{
		assertEquals(slider.statement().render().toString(),
			"$('#anId').slider({min: 5.0, max: 10.0});");
		slider.setSlideEvent(JsScopeUiEvent.quickScope("alert('event');"));
		assertTrue(slider.statement().render().toString()
			.contains("slide: function(event, ui) {\n\talert('event');\n}"));
	}

	/**
	 * Test method for
	 * {@link org.odlabs.wiquery.ui.slider.Slider#setStartEvent(org.odlabs.wiquery.ui.core.JsScopeUiEvent)}
	 * .
	 */
	@Test
	public void testSetStartEvent()
	{
		assertEquals(slider.statement().render().toString(),
			"$('#anId').slider({min: 5.0, max: 10.0});");
		slider.setStartEvent(JsScopeUiEvent.quickScope("alert('event');"));
		assertTrue(slider.statement().render().toString()
			.contains("start: function(event, ui) {\n\talert('event');\n}"));
	}

	/**
	 * Test method for
	 * {@link org.odlabs.wiquery.ui.slider.Slider#setStopEvent(org.odlabs.wiquery.ui.core.JsScopeUiEvent)}
	 * .
	 */
	@Test
	public void testSetStopEvent()
	{
		assertEquals(slider.statement().render().toString(),
			"$('#anId').slider({min: 5.0, max: 10.0});");
		slider.setStopEvent(JsScopeUiEvent.quickScope("alert('event');"));
		assertTrue(slider.statement().render().toString()
			.contains("stop: function(event, ui) {\n\talert('event');\n}"));
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#statement()}.
	 */
	@Test
	public void testStatement()
	{
		assertNotNull(slider.statement());
		assertEquals(slider.statement().render().toString(),
			"$('#anId').slider({min: 5.0, max: 10.0});");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#value(int)}.
	 */
	@Test
	public void testValueInt()
	{
		assertNotNull(slider.value(6));
		assertEquals(slider.value(6).render().toString(), "$('#anId').slider('value', 6);");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#values(int, int)}.
	 */
	@Test
	public void testValuesIntInt()
	{
		assertNotNull(slider.values(6, 8));
		assertEquals(slider.values(6, 8).render().toString(), "$('#anId').slider('values', 6, 8);");
	}

	/**
	 * Test method for {@link org.odlabs.wiquery.ui.slider.Slider#widget()}.
	 */
	@Test
	public void testWidget()
	{
		assertNotNull(slider.widget());
		assertEquals(slider.widget().render().toString(), "$('#anId').slider('widget');");
	}
}


text:
#ifndef GNUTLS_CRYPTO_H
# define GNUTLS_CRYPTO_H

typedef struct cipher_hd_st *gnutls_cipher_hd_t;

int gnutls_cipher_init (gnutls_cipher_hd_t * handle,
			gnutls_cipher_algorithm_t cipher,
			const gnutls_datum_t * key,
			const gnutls_datum_t * iv);
int gnutls_cipher_encrypt (const gnutls_cipher_hd_t handle,
			   void *text, size_t textlen);
int gnutls_cipher_decrypt (const gnutls_cipher_hd_t handle,
			   void *ciphertext, size_t ciphertextlen);
void gnutls_cipher_deinit (gnutls_cipher_hd_t handle);
int gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm);

typedef struct hash_hd_st *gnutls_hash_hd_t;
typedef struct hmac_hd_st *gnutls_hmac_hd_t;

int gnutls_hmac_init (gnutls_hmac_hd_t * dig,
		      gnutls_digest_algorithm_t algorithm, const void *key,
		      size_t keylen);
int gnutls_hmac (gnutls_hmac_hd_t handle, const void *text, size_t textlen);
void gnutls_hmac_output (gnutls_hmac_hd_t handle, void *digest);
void gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest);
int gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm);
int gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm, const void *key,
		      size_t keylen, const void *text, size_t textlen,
		      void *digest);

int gnutls_hash_init (gnutls_hash_hd_t * dig,
		      gnutls_digest_algorithm_t algorithm);
int gnutls_hash (gnutls_hash_hd_t handle, const void *text, size_t textlen);
void gnutls_hash_output (gnutls_hash_hd_t handle, void *digest);
void gnutls_hash_deinit (gnutls_hash_hd_t handle, void *digest);
int gnutls_hash_get_len (gnutls_digest_algorithm_t algorithm);
int gnutls_hash_fast (gnutls_digest_algorithm_t algorithm,
		      const void *text, size_t textlen, void *digest);

/* register ciphers */

#define GNUTLS_CRYPTO_API_VERSION 0x02

#define gnutls_crypto_single_cipher_st gnutls_crypto_cipher_st
#define gnutls_crypto_single_mac_st gnutls_crypto_mac_st
#define gnutls_crypto_single_digest_st gnutls_crypto_digest_st

typedef struct
{
  int (*init) (gnutls_cipher_algorithm_t, void **ctx);
  int (*setkey) (void *ctx, const void *key, size_t keysize);
  int (*setiv) (void *ctx, const void *iv, size_t ivsize);
  int (*encrypt) (void *ctx, const void *plain, size_t plainsize,
		  void *encr, size_t encrsize);
  int (*decrypt) (void *ctx, const void *encr, size_t encrsize,
		  void *plain, size_t plainsize);
  void (*deinit) (void *ctx);
} gnutls_crypto_cipher_st;

typedef struct
{
  int (*init) (gnutls_mac_algorithm_t, void **ctx);
  int (*setkey) (void *ctx, const void *key, size_t keysize);
  int (*hash) (void *ctx, const void *text, size_t textsize);
  int (*copy) (void **dst_ctx, void *src_ctx);
  int (*output) (void *src_ctx, void *digest, size_t digestsize);
  void (*deinit) (void *ctx);
} gnutls_crypto_mac_st;

/* the same... setkey should be null */
typedef gnutls_crypto_mac_st gnutls_crypto_digest_st;

/**
 * gnutls_rnd_level_t:
 * @GNUTLS_RND_NONCE: Non-predictable random number.  Fatal in parts
 *   of session if broken, i.e., vulnerable to statistical analysis.
 * @GNUTLS_RND_RANDOM: Pseudo-random cryptographic random number.
 *   Fatal in session if broken.
 * @GNUTLS_RND_KEY: Fatal in many sessions if broken.
 *
 * Enumeration of random quality levels.
 */
typedef enum gnutls_rnd_level
{
  GNUTLS_RND_NONCE = 0,
  GNUTLS_RND_RANDOM = 1,
  GNUTLS_RND_KEY = 2
} gnutls_rnd_level_t;

/**
 * gnutls_pk_flag_t:
 * @GNUTLS_PK_FLAG_NONE: No flag.
 *
 * Enumeration of public-key flag.
 */
typedef enum
{
  GNUTLS_PK_FLAG_NONE = 0
} gnutls_pk_flag_t;

typedef struct gnutls_crypto_rnd
{
  int (*init) (void **ctx);
  int (*rnd) (void *ctx, int level, void *data, size_t datasize);
  void (*deinit) (void *ctx);
} gnutls_crypto_rnd_st;

typedef void *bigint_t;

/**
 * gnutls_bigint_format_t:
 * @GNUTLS_MPI_FORMAT_USG: Raw unsigned integer format.
 * @GNUTLS_MPI_FORMAT_STD: Raw signed integer format, always a leading
 *   zero when positive.
 * @GNUTLS_MPI_FORMAT_PGP: The pgp integer format.
 *
 * Enumeration of different bignum integer encoding formats.
 */
typedef enum
{
  /* raw unsigned integer format */
  GNUTLS_MPI_FORMAT_USG = 0,
  /* raw signed integer format - always a leading zero when positive */
  GNUTLS_MPI_FORMAT_STD = 1,
  /* the pgp integer format */
  GNUTLS_MPI_FORMAT_PGP = 2
} gnutls_bigint_format_t;

typedef struct
{
  bigint_t g;			/* group generator */
  bigint_t p;			/* prime */
} gnutls_group_st;

/* Multi precision integer arithmetic */
typedef struct gnutls_crypto_bigint
{
  bigint_t (*bigint_new) (int nbits);
  void (*bigint_release) (bigint_t n);
  /* 0 for equality, > 0 for m1>m2, < 0 for m1<m2 */
  int (*bigint_cmp) (const bigint_t m1, const bigint_t m2);
  /* as bigint_cmp */
  int (*bigint_cmp_ui) (const bigint_t m1, unsigned long m2);
  /* ret = a % b */
    bigint_t (*bigint_mod) (const bigint_t a, const bigint_t b);
  /* a = b -> ret == a */
    bigint_t (*bigint_set) (bigint_t a, const bigint_t b);
  /* a = b -> ret == a */
    bigint_t (*bigint_set_ui) (bigint_t a, unsigned long b);
  unsigned int (*bigint_get_nbits) (const bigint_t a);
  /* w = b ^ e mod m */
    bigint_t (*bigint_powm) (bigint_t w, const bigint_t b,
			     const bigint_t e, const bigint_t m);
  /* w = a + b mod m */
    bigint_t (*bigint_addm) (bigint_t w, const bigint_t a,
			     const bigint_t b, const bigint_t m);
  /* w = a - b mod m */
    bigint_t (*bigint_subm) (bigint_t w, const bigint_t a, const bigint_t b,
			     const bigint_t m);
  /* w = a * b mod m */
    bigint_t (*bigint_mulm) (bigint_t w, const bigint_t a, const bigint_t b,
			     const bigint_t m);
  /* w = a + b */ bigint_t (*bigint_add) (bigint_t w, const bigint_t a,
					  const bigint_t b);
  /* w = a - b */ bigint_t (*bigint_sub) (bigint_t w, const bigint_t a,
					  const bigint_t b);
  /* w = a * b */
    bigint_t (*bigint_mul) (bigint_t w, const bigint_t a, const bigint_t b);
  /* w = a + b */
    bigint_t (*bigint_add_ui) (bigint_t w, const bigint_t a, unsigned long b);
  /* w = a - b */
    bigint_t (*bigint_sub_ui) (bigint_t w, const bigint_t a, unsigned long b);
  /* w = a * b */
    bigint_t (*bigint_mul_ui) (bigint_t w, const bigint_t a, unsigned long b);
  /* q = a / b */
    bigint_t (*bigint_div) (bigint_t q, const bigint_t a, const bigint_t b);
  /* 0 if prime */
  int (*bigint_prime_check) (const bigint_t pp);
  int (*bigint_generate_group) (gnutls_group_st * gg, unsigned int bits);

  /* reads an bigint from a buffer */
  /* stores an bigint into the buffer.  returns
   * GNUTLS_E_SHORT_MEMORY_BUFFER if buf_size is not sufficient to
   * store this integer, and updates the buf_size;
   */
    bigint_t (*bigint_scan) (const void *buf, size_t buf_size,
			     gnutls_bigint_format_t format);
  int (*bigint_print) (const bigint_t a, void *buf, size_t * buf_size,
		       gnutls_bigint_format_t format);
} gnutls_crypto_bigint_st;

#define GNUTLS_MAX_PK_PARAMS 6

typedef struct
{
  bigint_t params[GNUTLS_MAX_PK_PARAMS];
  unsigned int params_nr;	/* the number of parameters */
  unsigned int flags;
} gnutls_pk_params_st;

void gnutls_pk_params_release (gnutls_pk_params_st * p);
void gnutls_pk_params_init (gnutls_pk_params_st * p);

/* params are:
 * RSA:
 *  [0] is modulus
 *  [1] is public exponent
 *  [2] is private exponent (private key only)
 *  [3] is prime1 (p) (private key only)
 *  [4] is prime2 (q) (private key only)
 *  [5] is coefficient (u == inverse of p mod q) (private key only)
 *
 *  note that other packages use inverse of q mod p,
 *  so we need to perform conversions using fixup_params().
 *
 * DSA:
 *  [0] is p
 *  [1] is q
 *  [2] is g
 *  [3] is y (public key)
 *  [4] is x (private key only)
 */

/**
 * gnutls_direction_t:
 * @GNUTLS_IMPORT: Import direction.
 * @GNUTLS_EXPORT: Export direction.
 *
 * Enumeration of different directions.
 */
typedef enum
{
  GNUTLS_IMPORT = 0,
  GNUTLS_EXPORT = 1
} gnutls_direction_t;

/* Public key algorithms */
typedef struct gnutls_crypto_pk
{
  /* The params structure should contain the private or public key
   * parameters, depending on the operation */
  int (*encrypt) (gnutls_pk_algorithm_t, gnutls_datum_t * ciphertext,
		  const gnutls_datum_t * plaintext,
		  const gnutls_pk_params_st * public);
  int (*decrypt) (gnutls_pk_algorithm_t, gnutls_datum_t * plaintext,
		  const gnutls_datum_t * ciphertext,
		  const gnutls_pk_params_st * private);

  int (*sign) (gnutls_pk_algorithm_t, gnutls_datum_t * signature,
	       const gnutls_datum_t * data,
	       const gnutls_pk_params_st * private);
  int (*verify) (gnutls_pk_algorithm_t, const gnutls_datum_t * data,
		 const gnutls_datum_t * signature,
		 const gnutls_pk_params_st * public);

  int (*generate) (gnutls_pk_algorithm_t, unsigned int nbits,
		   gnutls_pk_params_st *);
  /* this function should convert params to ones suitable
   * for the above functions
   */
  int (*pk_fixup_private_params) (gnutls_pk_algorithm_t, gnutls_direction_t,
				  gnutls_pk_params_st *);

} gnutls_crypto_pk_st;

/* priority: infinity for backend algorithms, 90 for kernel
   algorithms, lowest wins
 */
# define gnutls_crypto_single_cipher_register(algo, prio, st)		\
  gnutls_crypto_single_cipher_register2 (algo, prio, \
					 GNUTLS_CRYPTO_API_VERSION, st)
# define gnutls_crypto_single_mac_register(algo, prio, st)		\
  gnutls_crypto_single_mac_register2 (algo, prio, \
				      GNUTLS_CRYPTO_API_VERSION, st)
# define gnutls_crypto_single_digest_register(algo, prio, st)		\
  gnutls_crypto_single_digest_register2(algo, prio,			\
					GNUTLS_CRYPTO_API_VERSION, st)

int gnutls_crypto_single_cipher_register2 (gnutls_cipher_algorithm_t
					   algorithm, int priority,
					   int version,
					   const
					   gnutls_crypto_single_cipher_st *
					   s);
int gnutls_crypto_single_mac_register2 (gnutls_mac_algorithm_t algorithm,
					int priority, int version,
					const gnutls_crypto_single_mac_st *
					s);
int gnutls_crypto_single_digest_register2 (gnutls_digest_algorithm_t
					   algorithm, int priority,
					   int version,
					   const
					   gnutls_crypto_single_digest_st *
					   s);

# define gnutls_crypto_cipher_register(prio, st)			\
  gnutls_crypto_cipher_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)
# define gnutls_crypto_mac_register(prio, st)				\
  gnutls_crypto_mac_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)
# define gnutls_crypto_digest_register(prio, st)			\
  gnutls_crypto_digest_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)

int gnutls_crypto_cipher_register2 (int priority, int version,
				    const gnutls_crypto_cipher_st * s);
int gnutls_crypto_mac_register2 (int priority, int version,
				 const gnutls_crypto_mac_st * s);
int gnutls_crypto_digest_register2 (int priority, int version,
				    const gnutls_crypto_digest_st * s);

# define gnutls_crypto_rnd_register(prio, st)				\
  gnutls_crypto_rnd_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)
# define gnutls_crypto_pk_register(prio, st)				\
  gnutls_crypto_pk_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)
# define gnutls_crypto_bigint_register(prio, st)			\
  gnutls_crypto_bigint_register2 (prio, GNUTLS_CRYPTO_API_VERSION, st)

int gnutls_crypto_rnd_register2 (int priority, int version,
				 const gnutls_crypto_rnd_st * s);
int gnutls_crypto_pk_register2 (int priority, int version,
				const gnutls_crypto_pk_st * s);
int gnutls_crypto_bigint_register2 (int priority, int version,
				    const gnutls_crypto_bigint_st * s);

#endif


text:
#import <UIKit/UIKit.h>
#import "MultiTouchView.h"

@interface MultiTouchButton : UIButton

/*! @brief Multitouch view reference */
@property(strong, nonatomic) MultiTouchView* multiTouchView;

@end


text:
package org.apache.velocity.runtime.resource.loader;

import java.io.InputStream;

import org.apache.commons.collections.ExtendedProperties;
import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.exception.ResourceNotFoundException;
import org.apache.velocity.runtime.resource.Resource;
import org.apache.velocity.util.ClassUtils;
import org.apache.velocity.util.ExceptionUtils;

/**
 *  ClasspathResourceLoader is a simple loader that will load
 *  templates from the classpath.
 *

 *

 *  Will load templates from  from multiple instances of
 *  and arbitrary combinations of :
 *

 *
 jar files
 *
 zip files
 *
 template directories (any directory containing templates)
 *

 *  This is a configuration-free loader, in that there are no
 *  parameters to be specified in the configuration properties,
 *  other than specifying this as the loader to use.  For example
 *  the following is all that the loader needs to be functional :
 *

 *

 *  resource.loader = class
 *  class.resource.loader.class =
 *    org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
 *

 *

 *  To use, put your template directories, jars
 *  and zip files into the classpath or other mechanisms that make
 *  resources accessable to the classloader.
 *

 *

 *  This makes deployment trivial for web applications running in
 *  any Servlet 2.2 compliant servlet runner, such as Tomcat 3.2
 *  and others.
 *

 *

 *  For a Servlet Spec v2.2 servlet runner,
 *  just drop the jars of template files into the WEB-INF/lib
 *  directory of your webapp, and you won't have to worry about setting
 *  template paths or altering them with the root of the webapp
 *  before initializing.
 *

 *

 *  I have also tried it with a WAR deployment, and that seemed to
 *  work just fine.
 *
 * @author Aki Nieminen
 * @author Geir Magnusson Jr.
 * @version $Id: ClasspathResourceLoader.java 471259 2006-11-04 20:26:57Z henning $
 */
public class ClasspathResourceLoader extends ResourceLoader
{

    /**
     *  This is abstract in the base class, so we need it
     * @param configuration
     */
    public void init( ExtendedProperties configuration)
    {
        if (log.isTraceEnabled())
        {
            log.trace("ClasspathResourceLoader : initialization complete.");
        }
    }

    /**
     * Get an InputStream so that the Runtime can build a
     * template with it.
     *
     * @param name name of template to get
     * @return InputStream containing the template
     * @throws ResourceNotFoundException if template not found
     *         in  classpath.
     */
    public InputStream getResourceStream( String name )
        throws ResourceNotFoundException
    {
        InputStream result = null;

        if (StringUtils.isEmpty(name))
        {
            throw new ResourceNotFoundException ("No template name provided");
        }

        /**
         * look for resource in thread classloader first (e.g. WEB-INF\lib in
         * a servlet container) then fall back to the system classloader.
         */

        try
        {
            result = ClassUtils.getResourceAsStream( getClass(), name );
        }
        catch( Exception fnfe )
        {
            throw (ResourceNotFoundException) ExceptionUtils.createWithCause(ResourceNotFoundException.class, "problem with template: " + name, fnfe );
        }

        if (result == null)
        {
             String msg = "ClasspathResourceLoader Error: cannot find resource " +
              name;

             throw new ResourceNotFoundException( msg );
        }

        return result;
    }

    /**
     * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#isSourceModified(org.apache.velocity.runtime.resource.Resource)
     */
    public boolean isSourceModified(Resource resource)
    {
        return false;
    }

    /**
     * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource)
     */
    public long getLastModified(Resource resource)
    {
        return 0;
    }
}


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

<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>ICallback</title>
<meta name="date" content="2015-01-09">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.share.mod.pay.ali.direct.inter

Interface ICallback

public interface ICallback

Method Summary

Methods

Modifier and Type
Method and Description

void
fail(javax.servlet.http.HttpServletRequest request,
    javax.servlet.http.HttpServletResponse response,
    java.lang.String out_trade_no,
    java.lang.String trade_no)

验证失败时

void
handleException(javax.servlet.http.HttpServletRequest request,
               javax.servlet.http.HttpServletResponse response,
               java.lang.Exception e)

异常处理

void
success(javax.servlet.http.HttpServletRequest request,
       javax.servlet.http.HttpServletResponse response,
       java.lang.String out_trade_no,
       java.lang.String trade_no)

验证通过时

void
tradeFinishedOrSuccess(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      java.lang.String out_trade_no,
                      java.lang.String trade_no)

验证通过时,注意,调用完后会继续调用success函数
 out_trade_no 商户订单号
 trade_no 支付宝订单号

Method Detail

fail

void fail(javax.servlet.http.HttpServletRequest request,
        javax.servlet.http.HttpServletResponse response,
        java.lang.String out_trade_no,
        java.lang.String trade_no)
          throws javax.servlet.ServletException,
                 java.io.IOException

验证失败时

Throws:

javax.servlet.ServletException

java.io.IOException

success

void success(javax.servlet.http.HttpServletRequest request,
           javax.servlet.http.HttpServletResponse response,
           java.lang.String out_trade_no,
           java.lang.String trade_no)
             throws javax.servlet.ServletException,
                    java.io.IOException

验证通过时

Throws:

javax.servlet.ServletException

java.io.IOException

tradeFinishedOrSuccess

void tradeFinishedOrSuccess(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response,
                          java.lang.String out_trade_no,
                          java.lang.String trade_no)
                            throws javax.servlet.ServletException,
                                   java.io.IOException

验证通过时,注意,调用完后会继续调用success函数
 out_trade_no 商户订单号
 trade_no 支付宝订单号

Throws:

javax.servlet.ServletException

java.io.IOException

handleException

void handleException(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response,
                   java.lang.Exception e)
                     throws javax.servlet.ServletException,
                            java.io.IOException

异常处理

Throws:

javax.servlet.ServletException

java.io.IOException

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
#pragma once
#include <aws/mediaconvert/MediaConvert_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace MediaConvert
{
namespace Model
{
  enum class CaptionSourceType
  {
    NOT_SET,
    ANCILLARY,
    DVB_SUB,
    EMBEDDED,
    SCTE20,
    SCC,
    TTML,
    STL,
    SRT,
    SMI,
    TELETEXT,
    NULL_SOURCE,
    IMSC
  };

namespace CaptionSourceTypeMapper
{
AWS_MEDIACONVERT_API CaptionSourceType GetCaptionSourceTypeForName(const Aws::String& name);

AWS_MEDIACONVERT_API Aws::String GetNameForCaptionSourceType(CaptionSourceType value);
} // namespace CaptionSourceTypeMapper
} // namespace Model
} // namespace MediaConvert
} // namespace Aws


text:
package com.castlemock.model.core;

/**
 * The TypeIdentifiable interface is marking a class that it can be identified with a {@link TypeIdentifier}
 * @author Karl Dahlgren
 * @since 1.0
 * @see TypeIdentifier
 */
public interface TypeIdentifiable {

    /**
     * The TypeIdentifier that is used to identify a specific class
     * @return Returns the type identifier
     */
    TypeIdentifier getTypeIdentifier();

    /**
     * Set a new value to the type identifier value
     * @param typeIdentifier The new type identifier value
     */
    void setTypeIdentifier(TypeIdentifier typeIdentifier);

}


text:
![Icon](src/icon48.png) Fanplayr Script Injector
============================================

A Chrome browser extension for injecting scripts based on the browser url.

## Installation

1. Download the extension here, <https://github.com/fanplayr/chrome-script-injector/archive/master.zip>.
2. Extract the zip file.
3. Navigate to chrome://extensions in Chrome.
4. Ensure the **Developer mode** option is checked.
5. Click the **Load unpacked extension** button.
6. Browse to the folder that was created when you extracted the zip file and click **Select**.

The extension should now be installed.

## Usage

### Creating a new rule

1. On **any** webpage, right-click and select **Fanplayr > Script Injector**.
2. Click the **New Rule** button at the bottom to define a new rule.
3. Enter the website's domain, url or pattern to match against.
    - Enter the customer's domain, for example `*fanplayr.com*` to have this rule run on any page on http://www.fanplayr.com.
4. Enter the script's url or content.
5. Click **Save Changes**.
6. Enable the rule you just added.

The script should be automatically injected into the url you defined the next time you visit it.

### Backing up settings

1. Open the extension options by right-clicking any page and selecting **Fanplayr > Script Injector**.
2. Click **Backup / Restore Settings**.
3. Copy the JSON text and store it in a safe location.

### Restoring settings

1. Open the extension options by right-clicking any page and selecting **Fanplayr > Script Injector**.
2. Click **Backup / Restore Settings**.
3. Paste the JSON text you previously saved into the text area.
4. Click **Restore**.


text:
using namespace std;

class InterpolationComponent : public Component
{
public:
	struct TransformGoal
	{
		AglVector3 translation;
		AglQuaternion rotation;
		AglVector3 scale;
		float timestamp;
	};

	InterpolationComponent()
	: Component( ComponentType::InterpolationComponent )
	{
		m_currentTransformTimestamp=-1.0f;
	}
	virtual ~InterpolationComponent() {}

public:
	float m_currentTransformTimestamp;
	float m_startTransformTimestamp;
	float m_goalTransformTimestamp;
	AglVector3 m_currentTranslation;
	AglVector3 m_startTranslation;
	AglVector3 m_goalTranslation;
	AglQuaternion m_currentRotation;
	AglQuaternion m_startRotation;
	AglQuaternion m_goalRotation;
	AglVector3 m_currentScale;
	AglVector3 m_startScale;
	AglVector3 m_goalScale;

	queue<TransformGoal> m_transformBuffer;
};


text:
package module3;

//Java utilities libraries
import java.util.ArrayList;
//import java.util.Collections;
//import java.util.Comparator;
import java.util.List;

import com.jogamp.opengl.math.geom.Frustum.Location;

//Processing library
import processing.core.PApplet;

//Unfolding libraries
import de.fhpotsdam.unfolding.UnfoldingMap;
import de.fhpotsdam.unfolding.marker.Marker;
import de.fhpotsdam.unfolding.data.PointFeature;
import de.fhpotsdam.unfolding.marker.SimplePointMarker;
import de.fhpotsdam.unfolding.providers.Google;
import de.fhpotsdam.unfolding.providers.MBTilesMapProvider;
import de.fhpotsdam.unfolding.utils.MapUtils;

//Parsing library
import parsing.ParseFeed;

/** EarthquakeCityMap
 * An application with an interactive map displaying earthquake data.
 * Author: UC San Diego Intermediate Software Development MOOC team
 * @author Your name here
 * Date: July 17, 2015
 * */
public class EarthquakeCityMap extends PApplet {

	// You can ignore this.  It's to keep eclipse from generating a warning.
	private static final long serialVersionUID = 1L;

	// IF YOU ARE WORKING OFFLINE, change the value of this variable to true
	private static final boolean offline = false;

	// Less than this threshold is a light earthquake
	public static final float THRESHOLD_MODERATE = 5;
	// Less than this threshold is a minor earthquake
	public static final float THRESHOLD_LIGHT = 4;

	/** This is where to find the local tiles, for working without an Internet connection */
	public static String mbTilesString = "blankLight-1-3.mbtiles";

	// The map
	private UnfoldingMap map;

	//feed with magnitude 2.5+ Earthquakes
	private String earthquakesURL = "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.atom";

	public void setup() {
		size(950, 600, OPENGL);

		if (offline) {
		    map = new UnfoldingMap(this, 200, 50, 700, 500, new MBTilesMapProvider(mbTilesString));
		    earthquakesURL = "2.5_week.atom"; 	// Same feed, saved Aug 7, 2015, for working offline
		}
		else {
			map = new UnfoldingMap(this, 200, 50, 700, 500, new Google.GoogleMapProvider());
			// IF YOU WANT TO TEST WITH A LOCAL FILE, uncomment the next line
			//earthquakesURL = "2.5_week.atom";
		}

	    map.zoomToLevel(2);
	    MapUtils.createDefaultEventDispatcher(this, map);

	    // The List you will populate with new SimplePointMarkers
	    List<Marker> markers = new ArrayList<Marker>();

	    //Use provided parser to collect properties for each earthquake
	    //PointFeatures have a getLocation method
	    List<PointFeature> earthquakes = ParseFeed.parseEarthquake(this, earthquakesURL);

	    // These print statements show you (1) all of the relevant properties
	    // in the features, and (2) how to get one property and use it

	    if (earthquakes.size() > 0) {
	    	PointFeature f = earthquakes.get(0);
	    	System.out.println(f.getProperties());
	    	Object magObj = f.getProperty("magnitude");
	    	Object mags = f.getLocation();
	    	System.out.println(mags);
	    	float mag = Float.parseFloat(magObj.toString());
	    	// PointFeatures also have a getLocation method
	    }

	    // Here is an example of how to use Processing's color method to generate
	    // an int that represents the color yellow.
	    int yellow = color(255, 255, 0);

	    //TODO: Add code here as appropriate
	    for (PointFeature point : earthquakes){
	    	SimplePointMarker marker = createMarker(point);;
	    	map.addMarker(marker);
	    }
	}

	// A suggested helper method that takes in an earthquake feature and
	// returns a SimplePointMarker for that earthquake
	// TODO: Implement this method and call it from setUp, if it helps
	private SimplePointMarker createMarker(PointFeature feature)
	{
		// finish implementing and use this method, if it helps.
		SimplePointMarker marker = new SimplePointMarker(feature.getLocation());
		float magObj = (float) feature.getProperty("magnitude");
		int myColor;
		if (magObj > 5.0){
			marker.setRadius(15);
			myColor = color(255, 0, 0);
		}
		else if (magObj > 4.0 ) {
			marker.setRadius(10);
			myColor = color(0, 255, 0);
		}
		else {
			marker.setRadius(5);
			myColor = color(0, 0, 255);
		}
		marker.setColor(myColor);
		return marker;
	}

	public void draw() {
	    background(10);
	    map.draw();
	    addKey();
	}

	// helper method to draw key in GUI
	// TODO: Implement this method to draw the key
	private void addKey()
	{
		// Remember you can use Processing's graphics methods here
		fill(255,255,255);
		rect(20, 50, 175, 300);
		fill(255,0,0);
		ellipse(50, 80, 15, 15);
		fill(0,255,0);
		ellipse(50, 120,10, 10);
		fill(0,0,255);
		ellipse(50, 160,5, 5);
		fill(255,255,255);
		fill(0,0,0);
		text("Earthquake key", 50, 65);
		text("5.0+ Magnitude", 65, 87);
		text("4.0+ Magnitude", 65, 125);
		text("Below 4.0", 65, 162);

	}
}


text:
chrome.test.runTests([
  function getEntryIdWorks() {
    chrome.fileSystem.chooseEntry({type: 'openFile'},
        chrome.test.callbackPass(function(entry) {
      var id = chrome.fileSystem.getEntryId(entry);
      chrome.test.assertTrue(id != null);
      var e = chrome.fileSystem.getEntryById(id);
      chrome.test.assertEq(e, entry);
    }));
  }
]);


text:
/* Multiboot v2 */
#ifndef KERNEL_INCLUDE_MULTIBOOT_HPP_
#define KERNEL_INCLUDE_MULTIBOOT_HPP_

/** @file
 * @brief multiboot v2 structure definition (public API)
 * @see https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html
 */

#include <stdint.h>
#include "multiboot_header.hpp"

/** @brief multiboot v2 header */
struct multiboot_header {
    /* Must be MULTIBOOT MAGIC - see above. */
    uint32_t magic;

    /* ISA */
    uint32_t architecture;

    /* Total header length. */
    uint32_t header_length;

    /* The above fields plus this one must equal 0 mod 2^32. */
    uint32_t checksum;
};

/** @brief default multiboot v2 header's tag */
struct multiboot_header_tag {
    uint16_t type;
    uint16_t flags;
    uint32_t size;
};

/** @brief tag to request specific information into the MBI */
struct multiboot_header_tag_information_request {
    uint16_t type;
    uint16_t flags;
    uint32_t size;
    uint32_t requests[0];
};

/** @brief tag to help bootloader to understand kernel image */
struct multiboot_header_tag_address {
    uint16_t type;
    uint16_t flags;
    uint32_t size;
    uint32_t header_addr;
    uint32_t load_addr;
    uint32_t load_end_addr;
    uint32_t bss_end_addr;
};

/** @brief tag to specify the entry point of the kernel */
struct multiboot_header_tag_entry_address {
    uint16_t type;
    uint16_t flags;
    uint32_t size;
    uint32_t entry_addr;
};

/** @brief tag to request specific console mode */
struct multiboot_header_tag_console_flags{
    uint16_t type;
    uint16_t flags;
    uint32_t size;
    uint32_t console_flags;
};

/** @brief tag to request specific framebuffer */
struct multiboot_header_tag_framebuffer {
    uint16_t type;
    uint16_t flags;
    uint32_t size;
    uint32_t width;
    uint32_t height;
    uint32_t depth;
};

/** @brief tag to request module to be page aligned */
struct multiboot_header_tag_module_align {
    uint16_t type;
    uint16_t flags;
    uint32_t size;
    uint32_t width;
    uint32_t height;
    uint32_t depth;
};

/** @brief multiboot v2 framebuffer's color */
struct multiboot_color {
    uint8_t red;
    uint8_t green;
    uint8_t blue;
};

/** @brief definition of a multiboot v2 mmap block */
typedef struct {
    uint64_t addr;
    uint64_t len;
#define MULTIBOOT_MEMORY_AVAILABLE          1
#define MULTIBOOT_MEMORY_RESERVED           2
#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE   3
#define MULTIBOOT_MEMORY_NVS                4
    uint32_t type;
    uint32_t zero;
} multiboot_memory_map_t __attribute__((packed));

/** @brief default multiboot v2 MBI's tag */
struct multiboot_tag {
    uint32_t type;
    uint32_t size;
};

/** @brief command line or string send to the kernel */
struct multiboot_tag_string {
    uint32_t type;
    uint32_t size;
    char string[0];
};

/** @brief description of a module in memory */
struct multiboot_tag_module {
    uint32_t type;
    uint32_t size;
    uint32_t mod_start;
    uint32_t mod_end;
    char cmdline[0];
};

/** @brief BIOS basic memory informations */
struct multiboot_tag_basic_meminfo {
    uint32_t type;
    uint32_t size;
    uint32_t mem_lower;
    uint32_t mem_upper;
};

/** @brief BIOS booting device informations */
struct multiboot_tag_bootdev {
    uint32_t type;
    uint32_t size;
    uint32_t biosdev;
    uint32_t slice;
    uint32_t part;
};

/** @brief BIOS/bootloader mmap section */
struct multiboot_tag_mmap {
    uint32_t type;
    uint32_t size;
    uint32_t entry_size;
    uint32_t entry_version;
    multiboot_memory_map_t entries[0];
};

/** @brief VBE informations */
struct multiboot_vbe_info_block {
    uint8_t external_specification[512];
};

/** @brief VBE mode's informations */
struct multiboot_vbe_mode_info_block {
    uint8_t external_specification[256];
};

/** @brief VBE informtions send by bootloader */
struct multiboot_tag_vbe {
    uint32_t type;
    uint32_t size;
    uint32_t vbe_mode;
    uint32_t vbe_interface_seg;
    uint32_t vbe_interface_off;
    uint32_t vbe_interface_len;
    struct multiboot_vbe_info_block vbe_control_info;
    struct multiboot_vbe_mode_info_block vbe_mode_info;
};

/** @brief bootloader framebuffer common informations */
struct multiboot_tag_framebuffer_common {
    uint32_t type;
    uint32_t size;
    uint64_t framebuffer_addr;
    uint32_t framebuffer_pitch;
    uint32_t framebuffer_width;
    uint32_t framebuffer_height;
    uint8_t framebuffer_bpp;
#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED  0
#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB      1
#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2
    uint8_t framebuffer_type;
    uint16_t reserved;
};

/** @brief bootloader framebuffer send to the kernel */
struct multiboot_tag_framebuffer {
    struct multiboot_tag_framebuffer_common common;
    union {
        struct {
            uint16_t framebuffer_palette_num_colors;
            struct multiboot_color framebuffer_palette[0];
        };

        struct {
            uint8_t framebuffer_red_field_position;
            uint8_t framebuffer_red_mask_size;
            uint8_t framebuffer_green_field_position;
            uint8_t framebuffer_green_mask_size;
            uint8_t framebuffer_blue_field_position;
            uint8_t framebuffer_blue_mask_size;
        };
    };
};

/** @brief ELF sections table */
struct multiboot_tag_elf_sections {
    uint32_t type;
    uint32_t size;
    uint32_t num;
    uint32_t entsize;
    uint32_t shndx;
    char sections[0];
};

/** @brief BIOS APM table */
struct multiboot_tag_apm {
    uint32_t type;
    uint32_t size;
    uint16_t version;
    uint16_t cseg;
    uint32_t offset;
    uint16_t cseg_16;
    uint16_t dseg;
    uint16_t flags;
    uint16_t cseg_len;
    uint16_t cseg_16_len;
    uint16_t dseg_len;
};

#endif /* KERNEL_INCLUDE_MULTIBOOT_HPP_ */


text:
<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model frontend\models\User */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Users', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

<?= Html::encode($this->title) ?>

Selamat, Anda telah berhasil melakukan konfirmasi akun pendaftaran mahasiswa baru Seminari Alkitab Asia Tenggara!

Silahkan login untuk melanjutkan proses pendaftaran Mahasiswa Baru

 <a href="<?= Yii::$app->urlManager->createUrl(['site/login']); ?>" class="btn btn-default btn-lg" style="margin-bottom: 20px;"> Login


text:
This section allows you to specify materials that are being referenced in the other sections, such as products or capabilities. Without being referenced, this section just becomes a holder for transferring material information.

## Structure
Placed in the "open_trade_transfer_package -> custom -> materials -> circuitdata" subelement, you can list one or more materials. Each element should be named and must should contain a tag with the version number of the CircuitData language being used.
### Example
```
"materials": {
  "circuitdata": {
    "osp": {
      "function": "final_finish",
      "version": 1.0,
      "group": "osp"
    }
  }
}
```

## Tags
The following main tags are available:

| Tags          | Description           | [Type](/README.md#about-types-and-how-to-use-them) | Uom | Required |
|:------------- |:----------------------|:----------------------------------------:|:---:|:--------:|
| version | The version of CircuitData language | number | None | Yes |
| circuitdata_material_db_id | Reference to the official CircuitData Material Database ID of the material | string | None | No |
| function | The function of the material. Choices are: "conductive", "dielectric", "soldermask", "stiffener", "final_finish" | string | None | Yes |
| group | The group will list the main choice of materials. The choices are different based on the function. The the list [below](#groups) | string | None | Yes |
| manufacturer | The brand that manufacture the material | string | None | No |
| name | The name of the material. Could very well be the same as the tag that holds the material | string | None | No |
| flexible | True to indicate if this material is flexible | Boolean | None | No - default is "false" |
| link | A link to a datasheet or webpage giving more information | string | None | No |
| remark | A piece of text giving further information on the material | string | None | No |
| additional | More text to describe the material | string | None | No |
| verified | To indicate if the information has been verified by its manufacturer | boolean | None | No |
| accept_equivalent | If used in profiles or products, a "true" here indicates that equivalent material is accepted | boolean | None | No |
| ul94 | The UL94 flame retardant capabilities. Choices are "v-0", "v-1", "hb" | string | None | No |
| attributes | Holds additional attributes. Read more [here](#attributes) | object | None | No |

## Groups
The following groups are available:
For "final_finish":
* c_bare_copper
* isn
* iag
* enig
* enepig
* osp
* ht_osp
* g
* GS
* t_fused
* tlu_unfused
* dig
* gwb-1_ultrasonic
* gwb-2-thermosonic
* s_hasl
* b1_lfhasl

For "dielectric":
* FR1
* FR2
* FR3
* FR4
* FR5
* G-10
* G-11
* CEM-1
* CEM-2
* CEM-3
* CEM-4
* CEM-5
* ceramic
* polyimide
* aramid
* acrylic
* LCP
* PEN
* PET

For "soldermask":
* LPISM
* DFISM
* LDISM

For "conductive":
* stainless_steel
* copper
* aluminum
* silver
* gold
* carbon
* silver_platinum
* silver_paladium
* gold_platinum
* platinum

## Attributes
The following attributes are available:
For "dielectric":

| Tags          | Description           | [Type](/README.md#about-types-and-how-to-use-them) | Uom | Required |
|:------------- |:----------------------|:----------------------------------------:|:---:|:--------:|
| ipc_standard | Which standard from IPC the material is in compliance with, 4101 or 4204 | String | None | No |
| ipc_slash_sheet |  | Array of Integers | None | No |
| tg_min |  | integer | Celsius | No |
| td_min |  | integer | Celsius | No |
| resin | Choices are: "epoxy", "bt", "cyanate_ester", "phenolic", "polyester", "polyimide", "ppe", "hydrocarbon", "ptfe", "thermoplastic" | string | None | No |
| resin_content |  | number | Percent | No |
| flame_retardant | Choices are: "phosphor", "red_phosphor", "bromine", "chlorine", "antimony_oxide", "rohs_compliant_bromine" | String | None | No |
| woven_reinforcement |  | Boolean | None | No |
| filler | Could be several. Choices are: "ceramic", "kaolin", "organic", "inorganic", "glass" | Array of strings | None | No |
| reinforcement | Choices are "e-glass", "s-glass", "ne-glass", "l-glass", "quartz", "aramid", "paper" | String | None | No |
| thickness |  | Number | micrometers | No |
| dk |  | number | None | No |
| cti |  | number | None | No |
| frequency |  | number | Gigahertz | No |
| df |  | number | Minutes | No |
| t260 |  | number | Minutes | No |
| t280 |  | number | Minutes | No |
| t300 |  | number | Minutes | No |
| mot |  | number | Celsius | No |
| z_cte |  | number | Percent | No |
| z_cte_before_tg |  | number | Percent | No |
| z_cte_after_tg |  | number | Percent | No |
| dielectric_breakdown |  | number | kV | No |
| water_absorption |  | number | Percent | No |
| thermal_conductivity |  | number | W/mK | No |
| volume_resistivity |  | number | megaOhm/centimeter | No |
| electric_strength |  | number | kV/mm | No |
| foil_roughness | Choices are "S", "L", "V" | string | None | No |

For "soldermask":

| Tags          | Description           | [Type](/README.md#about-types-and-how-to-use-them) | Uom | Required |
|:------------- |:----------------------|:----------------------------------------:|:---:|:--------:|
| ipc_sm_840_class | Choices are "T", "H", "TF", "HF" | string | None | No |
| finish | Choices are "matte", "glossy", "semi_glossy" | string | None | No |


text:
package org.apache.sling.engine;

import aQute.bnd.annotation.ProviderType;

/**
 * The SlingSettingsService provides basic Sling settings.
 * @deprecated Use the {@link org.apache.sling.settings.SlingSettingsService}
 */
@Deprecated
@ProviderType
public interface SlingSettingsService {

    /**
     * The identifier of the running Sling instance.
     * @return The Sling identifier
     */
    String getSlingId();
}


text:
package com.jiahaoliuliu.android.sampleaccountandserver.util;

import java.security.SecureRandom;

import javax.crypto.Cipher;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;

import android.util.Base64;

/**
 * The SecurityUtils class contains methods used for password encryption/decryption.
 */
public final class SecurityUtils {

    /**
     * The SecurityUtils class should not be instantiated, so its constructor.
     *  is private to prevent instantiation by other objects.
     */
    private SecurityUtils() { }

    /**
     * Digits used in hex format.
     */
    private static final String HEX = "0123456789ABCDEF";

    /**
     * Seed to encryption.
     */
    private static final String SEED = "com.jiahaoliuliu.android.sampleaccountandserver";

    /**
     * This method appends a byte to a string buffer with hex format.
     * @param sb String buffer to append in
     * @param b Byte to append to the buffer
     */
    private static void appendHex(StringBuffer sb, byte b) {
        sb.append(SecurityUtils.HEX.charAt((b >> 4) & 0x0f)).append(SecurityUtils.HEX.charAt(b & 0x0f));
    }

    /**
     * This method gets a raw key from the given seed.
     *  Raw key is needed for encrypt/decrypt text
     * @param seed Seed used to get the raw key
     * @return Byte array with the raw key
     * @throws Exception
     */
    private static byte[] getRawKey(byte[] seed) throws Exception {
        KeyGenerator kgen = KeyGenerator.getInstance("AES");
        SecureRandom sr = SecureRandom.getInstance("SHA1PRNG");
        sr.setSeed(seed);
        kgen.init(128, sr); // 192 and 256 bits may not be available
        SecretKey skey = kgen.generateKey();
        byte[] raw = skey.getEncoded();
        return raw;
    }

    /**
     * This method encrypts text with the given raw byte array.
     *  The algorithm used is AES
     * @param raw
     * @param clear Byte representation of text to encrypt
     * @return Byte array with encrypted text
     * @throws Exception
     */
    private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception {
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
        Cipher cipher = Cipher.getInstance("AES");
        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
        byte[] encrypted = cipher.doFinal(clear);
        return encrypted;
    }

    /**
     * This method decrypts encrypted text with the given raw byte array.
     * @param raw Byte array
     * @param encrypted Text encrypted for decryption
     * @return Byte array with decrypted text
     * @throws Exception
     */
    private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception {
        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
        Cipher cipher = Cipher.getInstance("AES");
        cipher.init(Cipher.DECRYPT_MODE, skeySpec);
        byte[] decrypted = cipher.doFinal(encrypted);
        return decrypted;
    }

    /**
     * This method converts a byte value into a String with hexadecimal format.
     * @param value Value to convert
     * @return String with hexadecimal format
     */
    private static String toHexadecimal(byte[] value) {
        String result = "";
        for (byte aux : value) {
            int b = aux & 0xff;
            if (Integer.toHexString(b).length() == 1) {
                result += "0";
            }
            result += Integer.toHexString(b);
        }

        return result;
    }

    /**
     * This method encrypts text.
     * @param cleartext Text to encrypt
     * @return String in hex format with |cleartext| encrypted
     * @throws Exception
     */
    public static String encryptToHex(String cleartext) throws Exception {
        byte[] rawKey = SecurityUtils.getRawKey(SecurityUtils.SEED.getBytes());
        byte[] result = SecurityUtils.encrypt(rawKey, cleartext.getBytes());
        return SecurityUtils.toHex(result);
    }

    /**
     * This method encrypts text.
     * @param cleartext Text to encrypt
     * @return |cleartext| encrypted into byte array
     * @throws Exception
     */
    public static byte[] encryptToBytes(String cleartext) throws Exception {
        byte[] rawKey = SecurityUtils.getRawKey(SecurityUtils.SEED.getBytes());
        byte[] result = SecurityUtils.encrypt(rawKey, cleartext.getBytes());
        return result;
    }

    /**
     * This method decrypts text.
     * @param encrypted Text to decrypt
     * @return String |encrypted| decrypted into a string
     * @throws Exception
     */
    public static String decrypt(String encrypted) throws Exception {
        byte[] rawKey = SecurityUtils.getRawKey(SecurityUtils.SEED.getBytes());
        byte[] enc = SecurityUtils.toByte(encrypted);
        byte[] result = SecurityUtils.decrypt(rawKey, enc);
        return new String(result);
    }

    /**
     * This method encodes a byte array into a string with base64 format.
     * @param bytes Byte array to encode
     * @return String with |bytes| encoded into base64
     */
    public static String base64Encode(byte[] bytes) {
        return Base64.encodeToString(bytes, Base64.NO_WRAP);
    }

    /**
     * This method decodes a base64 encoded string.
     * @param base64 String encoded in base64 format
     * @return String with |base64| decoded
     */
    public static String base64Decode(String base64) {
        return SecurityUtils.toHexadecimal(Base64.decode(base64, Base64.NO_WRAP));
    }

    /**
     * This method converts a string to its hex representation.
     */
    public static String toHex(String txt) {
        return SecurityUtils.toHex(txt.getBytes());
    }

    /**
     * This method converts a string in hex format to a byte array.
     */
    public static String fromHex(String hex) {
        return new String(SecurityUtils.toByte(hex));
    }

    /**
     * This method converts a string in hex format to a byte array.
     * @param hexString String in hex format to convert
     * @return Byte array gets from |hexString|
     */
    public static byte[] toByte(String hexString) {
        int len = hexString.length() / 2;
        byte[] result = new byte[len];
        for (int i = 0; i < len; i++) {
            result[i] = Integer.valueOf(hexString.substring(2 * i, 2 * i + 2), 16).byteValue();
        }
        return result;
    }

    /**
     * This method gives a hex conversion of a byte array.
     * @param buf Byte array to get its hex representation
     * @return String with |buf| in hex format
     */
    public static String toHex(byte[] buf) {
        if (buf == null) {
            return "";
        }
        StringBuffer result = new StringBuffer(2 * buf.length);
        for (int i = 0; i < buf.length; i++) {
            SecurityUtils.appendHex(result, buf[i]);
        }
        return result.toString();
    }
}


text:
package org.apache.mesos.wildfly.message.protocol;

import org.apache.mesos.wildfly.message.JsonMessage;

/**
 *
 * @author jzajic
 */
public class Uptime implements JsonMessage
{

    private long time;

    public long getTime()
    {
        return time;
    }

    public void setTime(long time)
    {
        this.time = time;
    }

}


text:
package com.platypii.baseline.tracks;

import com.platypii.baseline.BuildConfig;
import com.platypii.baseline.cloud.AuthException;
import com.platypii.baseline.cloud.AuthState;
import com.platypii.baseline.cloud.BaselineCloud;
import com.platypii.baseline.cloud.tasks.Task;
import com.platypii.baseline.cloud.tasks.TaskType;
import com.platypii.baseline.events.SyncEvent.DownloadFailure;
import com.platypii.baseline.events.SyncEvent.DownloadProgress;
import com.platypii.baseline.events.SyncEvent.DownloadSuccess;

import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import org.greenrobot.eventbus.EventBus;

/**
 * Download a track file from the cloud
 */
public class DownloadTrackTask extends Task {
    private static final String TAG = "DownloadTask";

    @NonNull
    private final TrackMetadata track;
    @NonNull
    private final String trackUrl;

    public DownloadTrackTask(@NonNull TrackMetadata track) {
        this.track = track;
        this.trackUrl = BaselineCloud.baselineServer + "/tracks/" + track.track_id + "/baseline-track.csv.gz";
    }

    @NonNull
    @Override
    public String id() {
        return track.track_id;
    }

    @NonNull
    @Override
    public TaskType taskType() {
        return TaskType.trackUpload;
    }

    @Override
    public void run(@Nullable Context context) throws AuthException, IOException {
        if (context == null) {
            throw new NullPointerException("TrackUploadTask needs Context");
        }

        try {
            final File trackFile = track.localFile(context);
            if (!trackFile.exists()) {
                Log.i(TAG, "Downloading track " + track);
                EventBus.getDefault().post(new DownloadProgress(track, 0, 1));
                // Make HTTP request
                downloadTrack(trackFile);
                Log.i(TAG, "Download successful, track " + track);
            } else {
                Log.i(TAG, "Track file exists, skipping download " + trackFile);
            }

            final File abbrvFile = track.abbrvFile(context);
            if (!abbrvFile.exists()) {
                // Make abbrv file
                Log.i(TAG, "Generating abbreviated track file " + abbrvFile);
                TrackAbbrv.abbreviate(trackFile, abbrvFile);
            }
            // Notify listeners
            EventBus.getDefault().post(new DownloadSuccess(track, trackFile));
        } catch (Exception e) {
            Log.e(TAG, "Failed to download file", e);
            // Notify listeners
            EventBus.getDefault().post(new DownloadFailure(track, e));
            // Re-throw exception to indicate Task failure
            throw e;
        }
    }

    /**
     * HTTP get track data from baseline
     */
    private void downloadTrack(@NonNull File trackFile) throws IOException, AuthException {
        final URL url = new URL(trackUrl);
        final String auth = AuthState.getToken();
        final HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestProperty("Cookie", auth);
        conn.setRequestProperty("User-Agent", "BASEline Android App/" + BuildConfig.VERSION_NAME);
        conn.addRequestProperty("Accept-Encoding", "identity"); // Without this, okhttp gets confused about gzip
        try {
            // Read response
            final int status = conn.getResponseCode();
            if (status == 200) {
                // Read body
                final InputStream is = conn.getInputStream();
                copy(track, is, trackFile, conn.getContentLength());
                // TODO: Check file hash?
                Log.i(TAG, "Track download successful");
            } else if (status == 401) {
                throw new AuthException(auth);
            } else {
                throw new IOException("Failed to download track " + track + " http status code " + status);
            }
        } catch (IOException e) {
            // Remove partial file so that download will retry
            if (!trackFile.delete()) {
                Log.e(TAG, "Failed to delete file for failed track download");
            }
            // Delete parent directory if it's empty
            if (!trackFile.getParentFile().delete()) {
                Log.w(TAG, "Failed to delete track folder for failed track download");
            }
            // Rethrow exception
            throw e;
        } finally {
            conn.disconnect();
        }
    }

    /**
     * Copy bytes from input stream to file, and update download progress
     */
    private static void copy(@NonNull TrackMetadata track, @NonNull InputStream is, @NonNull File file, int contentLength) throws IOException {
        // Make parent directory if needed
        final File parent = file.getParentFile();
        if (parent != null && !parent.exists()) {
            if (!parent.mkdirs()) {
                Log.e(TAG, "Failed to make track directory " + parent);
            }
        }
        // Copy input stream to output stream
        final OutputStream os = new FileOutputStream(file);
        final byte[] buffer = new byte[1024];
        int bytesRead;
        int bytesCopied = 0;
        while ((bytesRead = is.read(buffer)) != -1) {
            os.write(buffer, 0, bytesRead);
            bytesCopied += bytesRead;

            // Update download progress state
            EventBus.getDefault().post(new DownloadProgress(track, bytesCopied, contentLength));
        }
        is.close();
        os.close();
    }

    @NonNull
    @Override
    public String toString() {
        return "TrackDownload(" + id() + ", " + track.getName() + ")";
    }

}


text:
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using OpenTK;
using OpenTK.Graphics;

namespace osu.Game.Screens.Select
{
    public class WedgeBackground : Container
    {
        public WedgeBackground()
        {
            Children = new[]
            {
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Size = new Vector2(1, 0.5f),
                    Colour = Color4.Black.Opacity(0.5f),
                    Shear = new Vector2(0.15f, 0),
                    EdgeSmoothness = new Vector2(2, 0),
                },
                new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    RelativePositionAxes = Axes.Y,
                    Size = new Vector2(1, -0.5f),
                    Position = new Vector2(0, 1),
                    Colour = Color4.Black.Opacity(0.5f),
                    Shear = new Vector2(-0.15f, 0),
                    EdgeSmoothness = new Vector2(2, 0),
                },
            };
        }
    }
}


text:
title: "Добро пожаловать на курс!"
date: 2019-05-25
tags:
 - announcement
category:
 - pyneng-7
---

Вводная информация о курсе:

* [Презентация](https://gitpitch.com/natenka/pyneng-slides/py3_course_summary)

К следующей лекции надо:

* Зарегистрироваться и прислать имена пользователей в [slack и github](https://pyneng.github.io/pyneng-7/preparation/)
* Подготовить [виртуалку](https://pyneng.github.io/docs/course-vm/)

Полезные ссылки:

* [Сайт курса](https://pyneng.github.io/)
* [Книга "Python для сетевых инженеров"](https://pyneng.readthedocs.io/ru/latest/)
* [Виртуалки](https://pyneng.github.io/docs/course-vm/)

Советы и ссылки о подготовке, обучению и о том как учиться:

* [https://pyneng.github.io/docs/learning/](https://pyneng.github.io/docs/learning/)

## Следующая лекция

Следующая лекция состоится 1 июня в 7:00 UTC.

Для подготовки к следующей лекции надо прочитать раздел [2. Использование Git и GitHub](https://pyneng.readthedocs.io/ru/latest/book/02_git_github/index.html).


text:
<link rel="import" href="../bower_components/polymer/polymer.html"/>

<dom-module id="my-counter-controls">
    <template>

Controls: <button on-click="reset">Reset</button>

    </template>

</dom-module>


text:
package net.sf.antcontrib.cpptasks;

import net.sf.antcontrib.cpptasks.compiler.LinkerConfiguration;
import net.sf.antcontrib.cpptasks.compiler.ProcessorConfiguration;
import org.apache.tools.ant.BuildException;

import java.io.File;
import java.util.Hashtable;
import java.util.Vector;

/**
 * This class matches each visited file with an appropriate compiler
 *
 * @author Curt Arnold
 */
public final class TargetMatcher implements FileVisitor {
    private final LinkerConfiguration linker;
    private final Vector<File> objectFiles;
    private final File outputDir;
    private final ProcessorConfiguration[] processors;
    private final File[] sourceFiles = new File[1];
    private final Hashtable<String, TargetInfo> targets;
    private final VersionInfo versionInfo;
    private final CCTask task;

    public TargetMatcher(CCTask task, File outputDir,
                         ProcessorConfiguration[] processors, LinkerConfiguration linker,
                         Vector<File> objectFiles, Hashtable<String, TargetInfo> targets,
                         VersionInfo versionInfo) {
        this.task = task;
        this.outputDir = outputDir;
        this.processors = processors;
        this.targets = targets;
        this.linker = linker;
        this.objectFiles = objectFiles;
        this.versionInfo = versionInfo;
    }

    public void visit(File parentDir, String filename) throws BuildException {
        File fullPath = new File(parentDir, filename);
        //
        //   see if any processor wants to bid
        //       on this one
        ProcessorConfiguration selectedCompiler = null;
        int bid = 0;
        if (processors != null) {
            for (ProcessorConfiguration processor : processors) {
                int newBid = processor.bid(fullPath.toString());
                if (newBid > bid) {
                    bid = newBid;
                    selectedCompiler = processor;
                }
            }
        }
        //
        //   no processor interested in file
        //      log diagnostic message
        if (bid <= 0) {
            if (linker != null) {
                int linkerbid = linker.bid(filename);
                if (linkerbid > 0) {
                    objectFiles.addElement(fullPath);
                    if (linkerbid == 1) {
                        task.log("Unrecognized file type " + fullPath.toString()
                                + " will be passed to linker");
                    }
                }
            }
        } else {
            //
            //  get output file name
            //
            String[] outputFileNames = selectedCompiler.getOutputFileNames(filename, versionInfo);
            sourceFiles[0] = fullPath;
            //
            //   if there is some output for this task
            //      (that is a source file and not an header file)
            //
            for (String outputFileName : outputFileNames) {
                //
                //   see if the same output file has already been registered
                //
                TargetInfo previousTarget = targets.get(outputFileName);
                if (previousTarget == null) {
                    targets.put(outputFileName, new TargetInfo(selectedCompiler, sourceFiles,
                            null, new File(outputDir, outputFileName),
                            selectedCompiler.getRebuild()));
                } else {
                    if (!previousTarget.getSources()[0].equals(sourceFiles[0])) {
                        throw new BuildException(String.format("Output filename conflict:"
                                + " %s would be produced from %s and %s",
                                outputFileName, previousTarget.getSources()[0], filename));
                    }
                }
            }
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Syst. mycol. (Lundae) 1: 336 (1821)

#### Original name
Boletus unicolor Bull., 1785

### Remarks
null


text:
package cake.internal.container;

import org.cakeframework.container.Component;
import org.cakeframework.container.ComponentConfiguration;
import org.cakeframework.container.ComponentListener;
import org.cakeframework.lifecycle.OnInitialize;
import org.cakeframework.lifecycle.OnStart;
import org.cakeframework.lifecycle.OnStop;

/**
 * The default lifecycle listener for {@link OnInitialize}, {@link OnStart} and {@link OnStop}.
 */
// Skal vel registreres af profilen???
// Saa man f.eks. kan fjerne den igen inde containeren starter.
class DefaultComponentLifecycleListener implements ComponentListener {

    @Override
    public void component_onInitialize(ComponentConfiguration<?> configuration, Component component) {
        component.processMethodsAnnotatedWith(OnInitialize.class, m -> m.inject().invoke());
    }

    @Override
    public void component_onStart(Component component) {
        component.processMethodsAnnotatedWith(OnStart.class, m -> m.inject().invoke());
    }

    @Override
    public void component_onStop(Component component) {
        component.processMethodsAnnotatedWith(OnStop.class, m -> m.inject().invoke());
    }
}


text:
namespace LeGame.Exceptions
{
    public class MapException : GameException
    {
        public MapException(string message)
            : base(message)
        {
        }
    }
}


text:
def grade(tid, answer):
	if answer.find("changing_things_up_once_in_a_while_is_gooood_for_you") != -1:
		return { "correct": True, "message": "Nice job!" }
	return { "correct": False, "message": "If you're confused, read some tutorials :)" }