text:
<?php
/**
 * This file is automatically @generated by {@link GeneratePhonePrefixData}.
 * Please don't modify it directly.
 */

return array (
  86376 => 'Xinyang, Henan',
);


text:
const { WebMessageUriMismatch } = require('../../helpers/errors');
const instance = require('../../helpers/weak_cache');

/*
 * Checks that provided web_message_uri is allowed in the client configuration
 *
 * @throws: web_message_uri_mismatch
 */
module.exports = function checkWebMessageUri(ctx, next) {
  const { oidc } = ctx;
  const { client, params } = oidc;

  if (instance(ctx.oidc.provider).configuration('features.webMessageResponseMode.enabled')) {
    if (params.web_message_uri && !client.webMessageUriAllowed(params.web_message_uri)) {
      throw new WebMessageUriMismatch();
    } else {
      oidc.webMessageUriCheckPerformed = true;
    }
  }

  return next();
};

redpajama_set_name: RedPajamaGithub


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

using Autodesk.Revit;
using Autodesk.Revit.UI;

namespace Revit.SDK.Samples.ViewPrinter.CS
{
    /// <summary>
    /// To add an external command to Autodesk Revit
    /// the developer should implement an object that
    /// supports the IExternalCommand interface.
    /// </summary>
    [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)]
    [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)]
    [Autodesk.Revit.Attributes.Journaling(Autodesk.Revit.Attributes.JournalingMode.NoCommandData)]
    public class Command : IExternalCommand
    {
        /// <summary>
        /// Implement this method as an external command for Revit.
        /// </summary>
        /// <param name="commandData">An object that is passed to the external application
        /// which contains data related to the command,
        /// such as the application object and active view.</param>
        /// <param name="message">A message that can be set by the external application
        /// which will be displayed if a failure or cancellation is returned by
        /// the external command.</param>
        /// <param name="elements">A set of elements to which the external application
        /// can add elements that are to be highlighted in case of failure or cancellation.</param>
        /// <returns>Return the status of the external command.
        /// A result of Succeeded means that the API external method functioned as expected.
        /// Cancelled can be used to signify that the user cancelled the external operation
        /// at some point. Failure should be returned if the application is unable to proceed with
        /// the operation.</returns>
        public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData,
        ref string message, Autodesk.Revit.DB.ElementSet elements)
        {
            Autodesk.Revit.DB.Transaction newTran = null;
            try
            {
                newTran = new Autodesk.Revit.DB.Transaction(commandData.Application.ActiveUIDocument.Document, "ViewPrinter");
                newTran.Start();

                PrintMgr pMgr = new PrintMgr(commandData);

                if (null == pMgr.InstalledPrinterNames)
                {
                    PrintMgr.MyMessageBox("No installed printer, the external command can't work.");
                    return Autodesk.Revit.UI.Result.Cancelled;
                }

                using (PrintMgrForm pmDlg = new PrintMgrForm(pMgr))
                {
                    if (pmDlg.ShowDialog() != DialogResult.Cancel)
                    {
                        newTran.Commit();
                        return Autodesk.Revit.UI.Result.Succeeded;
                    }
                    newTran.RollBack();
                }

            }
            catch (Exception ex)
            {
                if (null != newTran)
                    newTran.RollBack();
                message = ex.ToString();
                return Autodesk.Revit.UI.Result.Failed;
            }

            return Autodesk.Revit.UI.Result.Cancelled;
        }

    }
}


text:
<?php

echo '
';
if (isset($errors))
{
    foreach ($errors as $error)
    {
        echo $error;
    }
}
echo Form::open();
echo Form::label('title', 'Title');
echo Form::input('title') . '
';
echo Form::label('desc', 'Desc');
echo Form::textarea('desc', '', array('class' => 'editor')) . '
';
echo Form::label('comments_on', 'Yes');
echo Form::radio('comments_on', '1', TRUE);
echo Form::label('comments_on', 'No');
echo Form::radio('comments_on', '0', FALSE) . '
';
echo Form::submit('submit', 'Create');
echo Form::close();
echo '
';


text:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-migrations
    xmlns="http://doctrine-project.org/schemas/migrations/configuration"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://doctrine-project.org/schemas/migrations/configuration
    http://doctrine-project.org/schemas/migrations/configuration.xsd">

    <name>ShiftContentNew Migrations</name>
    <migrations-namespace>ShiftContentNewMigrations</migrations-namespace>
    <table name="shiftcontentnew_migrations" />
    <migrations-directory>.</migrations-directory>

</doctrine-migrations>


text:
package figglewatts.slagd.graphics.font;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture.TextureFilter;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;

/**
 * Static class to generate and draw fonts
 * @author Figglewatts
 *
 */
public class SlagdFont {
	private SlagdFont() { }

	private static FreeTypeFontGenerator generator;
	private static FreeTypeFontParameter parameter = new FreeTypeFontParameter();

	/**
	 * Generate a font with the given parameters
	 * @param pathToFont The path to the font (in the assets folder)
	 * @param size Size to generate the font at
	 * @param useNearest Should the font use Nearest Neighbour texure filtering
	 * @return A BitmapFont instance
	 */
	public static BitmapFont GenerateFont(String pathToFont, int size, boolean useNearest) {
		generator = new FreeTypeFontGenerator(Gdx.files.internal(pathToFont));
		parameter.size = size;
		if (useNearest) {
			parameter.minFilter = TextureFilter.Nearest;
			parameter.magFilter = TextureFilter.Nearest;
		}
		return generator.generateFont(parameter);
	}

	/**
	 * Generate a font with the given parameters
	 * @param pathToFont The path to the font (in the assets folder)
	 * @param params The parameters to generate with
	 * @return A BitmapFont instance
	 */
	public static BitmapFont GenerateFont(String pathToFont, FreeTypeFontParameter params) {
		generator = new FreeTypeFontGenerator(Gdx.files.internal(pathToFont));
		return generator.generateFont(params);
	}

	/**
	 * Draw a font with an outline with of 1 pixel
	 * @param font The font to use
	 * @param color The color of the font
	 * @param outline The color of the outline
	 * @param text The text to draw
	 * @param x The X position to draw at
	 * @param y The Y position to draw at
	 * @param batch The SpriteBatch to use
	 */
	public static void DrawWithOutline(BitmapFont font, Color color, Color outline, String text, int x, int y, SpriteBatch batch) {
		Color colorCache = font.getColor();
		font.setColor(outline);
		font.draw(batch, text, x+1, y);
		font.draw(batch, text, x-1, y);
		font.draw(batch, text, x, y-1);
		font.draw(batch, text, x, y+1);
		font.draw(batch, text, x+1, y-1);
		font.draw(batch, text, x+1, y+1);
		font.draw(batch, text, x-1, y-1);
		font.draw(batch, text, x-1, y-1);
		font.setColor(color);
		font.draw(batch, text, x, y);
		font.setColor(colorCache);
	}

	/**
	 * Draw a font with a drop shadow
	 * @param font The font to use
	 * @param color The color of the font
	 * @param shadow The color of the shadow
	 * @param text The text to draw
	 * @param distance The distance from the text to draw the shadow
	 * @param x The X position of the text
	 * @param y The Y position of the text
	 * @param batch The SpriteBatch to use
	 */
	public static void DrawWithShadow(BitmapFont font, Color color, Color shadow, String text, int distance, int x, int y, SpriteBatch batch) {
		Color colorCache = font.getColor();
		font.setColor(shadow);
		font.draw(batch, text, x+distance, y-distance);
		font.setColor(color);
		font.draw(batch, text, x, y);
		font.setColor(colorCache);
	}
}


text:
<?php
namespace com\github\gooh\InterfaceDistiller\Distillate;
class TestClass
{
    const FOO = 1;
    /**
     * DocBlock
     */
    static public function foo() {}
    static public function fn1() {}
    public function fn2() {}
    public function fn3(TestClass $testClass) {}
    public function fn4($bar = TestClass::FOO) {}
    public function fn5(&$bar) {}
    public function fn6(array $foo) {}
    public function fn7(array $foo = array()) {}
    public function fn8($foo = array()) {}
    public function fn9(\DateTime $dateTime) {}
}


text:
import json

from linkedin.mobster.har.css import CSSProfileParser
from linkedin.mobster.har.network import NetworkEventHandler
from linkedin.mobster.har.page import PageEventHandler, PageLoadNotifier
from linkedin.mobster.har.timeline import TimelineEventHandler
from linkedin.mobster.utils import wait_until, format_time
from linkedin.mobster.webkitclient import RemoteWebKitClient
from linkedin.mobster.webkitcommunicator import RemoteWebKitCommunicator

class FlowProfiler(RemoteWebKitClient):
  """
  Runs a flow and records profiling information for each navigation. Generates HAR file.
  """
  def __init__(self, test_file, iterations=1):
    super(FlowProfiler, self).__init__(RemoteWebKitCommunicator())
    assert iterations > 0, "iterations must be a positive integer"
    self._iterations = iterations
    self._page_event_handler = None
    self._network_event_handler = None
    self._timeline_event_handler = None
    self._css_profiler_handler = None

    with open(test_file, 'r') as f:
      self._test = json.loads(f.read())

    assert len(self._test) > 0, 'The test must have at least one navigation'

  def profile(self):
    """
    Runs the test specified by the test file given to the constructor, and returns a list of HAR files (one for each
    navigation)
    """

    # list of list of har files: [[hars from run 1], [hars from run 2], ...]
    iteration_hars = []

    for x in range(0, self._iterations):
      hars = []
      self.clear_http_cache()
      self.clear_cookies()

      # Navigate to about:blank, to reset memory, etc.
      self._page_event_handler = PageEventHandler()
      self.start_page_event_monitoring(self._page_event_handler.process_event)
      self.navigate_to('about:blank')
      wait_until(lambda: self._page_event_handler.page_loaded)
      self.stop_page_event_monitoring()

      for navigation in self._test['navigations']:
        assert len(navigation) > 0, 'Each navigation must have at least one action'

        # do all the actions except the last one, because the last action causes the actual page navigation
        for i in range(0, len(navigation) - 1):
          self.process_action(navigation[i])

        self._network_event_handler = NetworkEventHandler()
        try:
          wait_for_page_load_event = navigation[-1]['wait-for-page-load']
        except KeyError:
          wait_for_page_load_event = True
        try:
          self._page_load_notifier = PageLoadNotifier(wait_for_page_load_event, navigation[-1]['network-timeout'])
        except KeyError:
          self._page_load_notifier = PageLoadNotifier(wait_for_page_load_event)

        self._timeline_event_handler = TimelineEventHandler()
        self.start_network_monitoring(self._network_event_handler.process_event)
        self.start_timeline_monitoring(self._timeline_event_handler.process_event)
        self.start_page_event_monitoring(self._page_load_notifier.process_page_event)
        self._communicator.add_domain_callback('Network', 'page_load_notifier', self._page_load_notifier.process_network_event)
        self._communicator.add_domain_callback('Timeline', 'page_load_notifier', self._page_load_notifier.process_timeline_event)
        self.start_css_selector_profiling()
        self.process_action(navigation[-1])

        wait_until(lambda: self._page_load_notifier.page_loaded())
        self.stop_page_event_monitoring()
        self.stop_timeline_monitoring()
        self.stop_network_monitoring()
        self._css_profiler_handler = CSSProfileParser(self.stop_css_selector_profiling())

        hars.append(self.make_har(navigation[-1]['page-name']))

      iteration_hars.append(hars)

    return iteration_hars

  def process_action(self, action):
    {
      'navigate': lambda: self.navigate_to(action['params']['url']),
      'textfield-set': lambda: self.set_field_value(action['params']['id'], action['params']['value']),
      'click': lambda: self.click_button(action['params']['id']),
      'dispatch-event': lambda: self.dispatch_event(action['params']),
      'form-submit': lambda: self.submit_form_by_id(action['params']['id']),
      'link-click': lambda: self.submit_form_by_id(action['params']),
      'raw-js': lambda: self.run_js(';'.join(action['params']['lines']))
    }[action['type']]()

  def make_har(self, page_name):
    """
    Returns a python dictionary which can be turned into a HAR file via conversion to JSON.

    page_name is this name that the flow file assigned to this page.
    """
    return {
      'log': {
        'version': '1.2',
        'creator': {
          'name': 'Mobster',
          'version': '1.0'
        },
        '_os': {
           '_name': self.get_os_name(),
           '_version': self.get_os_version()
        },
        'browser': {
          'name': self.get_browser_name(),
          'version': self.get_browser_version()
        },
        'pages': [self.make_page_info(page_name)],
        'entries': self._network_event_handler.make_entry_list()
      }
    }

  def make_page_info(self, page_name):
    """
    Make the 'page' entry for this page, which goes into the 'pages' section of the HAR file.
    Includes overall page timings and some memory-related information which is not included in
    normal HAR files
    """

    return {
      'startedDateTime': format_time(self._network_event_handler.get_first_request_time()),
      'id': self._network_event_handler.primary_page_id,
      'title': self.run_js('document.title'),
      '_pageName': page_name,
      'pageTimings': self.get_page_timings(),
      '_memoryStats': self._timeline_event_handler.get_memory_stats(),
      '_eventStats': self._timeline_event_handler.get_event_stats(),
      '_domNodeStats': self.get_dom_node_count(),
      '_cssStats': self._css_profiler_handler.get_css_stats()
    }

  def get_page_timings(self):
    """
    Returns a dictionary containing onContentLoad and onLoad times, both in (whole) milliseconds from
    the start of the request
    """
    browser_timings = self.get_window_performance()
    first_request_start = self._network_event_handler.get_first_request_time()
    return {
      'onContentLoad': max(int(browser_timings['domContentLoadedEventEnd'] - (first_request_start * 1000)), -1),
      'onLoad' : max(int(browser_timings['loadEventEnd'] - (first_request_start * 1000)), -1)
    }


text:
Right now [Who pays artists?](http://whopaysartists.com/) is a work in progress, with a mockup on the main page and this repository representing some initial work.

If you'd like to contribute, you can help by closing any issues with PRs.

Because there is so much interest, make sure to comment that you are working to close an issue to avoid duplication of labor.

## Dependencies
 - Node - [http://nodejs.org/](http://nodejs.org/)
 - NPM - [https://www.npmjs.org/](https://www.npmjs.org/)
 - Mongo DB - [http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/](http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/)

The easiest way to install these three dependancies is with Homebrew:

```
$ brew update
$ brew install node # npm comes baked into node
$ brew install mongodb
```

## Getting setup

 - Clone the repository
 - ```$ npm install```
 - ```$ npm start```
 - Point your browser to [http://localhost:3000](http://localhost:3000)

## Common problems

```Error: Cannot find module 'express'```

Make sure you've run ```$ npm install```

```
TypeError: Cannot call method 'createCollection' of null
at /Users/youruser/Workspaces/WhoPaysArtists/storage.js:29:16
```

Make sure you've installed MongoDB and that it's running


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Proc. Indian Acad. Sci. , Pl. Sci. 43B: 173 (1956)

#### Original name
Anthasthoopa Subram. & K. Ramakr.

### Remarks
null


text:
ccflags-y += -I$(srctree)/include/microkernel
ccflags-y += -I$(CURDIR)/misc/generated/sysgen

obj-y = kernel_main.o


text:
using Quasar.HabboHotel.GameClients;

namespace Quasar.HabboHotel.Items.Interactor
{
    public class InteractorLoveShuffler : IFurniInteractor
    {
        public void OnPlace(GameClient Session, Item Item)
        {
            Item.ExtraData = "-1";
            Item.UpdateNeeded = true;
        }

        public void OnRemove(GameClient Session, Item Item)
        {
            Item.ExtraData = "-1";
        }

        public void OnTrigger(GameClient Session, Item Item, int Request, bool HasRights)
        {
            if (!HasRights)
            {
                return;
            }

            if (Item.ExtraData != "0")
            {
                Item.ExtraData = "0";
                Item.UpdateState(false, true);
                Item.RequestUpdate(10, true);
            }
        }

        public void OnWiredTrigger(Item Item)
        {
            if (Item.ExtraData != "0")
            {
                Item.ExtraData = "0";
                Item.UpdateState(false, true);
                Item.RequestUpdate(10, true);
            }
        }
    }
}


text:
COMPILER_RT_ABI fp_t __divsf3(fp_t a, fp_t b) {

  const unsigned int aExponent = toRep(a) >> significandBits & maxExponent;
  const unsigned int bExponent = toRep(b) >> significandBits & maxExponent;
  const rep_t quotientSign = (toRep(a) ^ toRep(b)) & signBit;

  rep_t aSignificand = toRep(a) & significandMask;
  rep_t bSignificand = toRep(b) & significandMask;
  int scale = 0;

  // Detect if a or b is zero, denormal, infinity, or NaN.
  if (aExponent - 1U >= maxExponent - 1U ||
      bExponent - 1U >= maxExponent - 1U) {

    const rep_t aAbs = toRep(a) & absMask;
    const rep_t bAbs = toRep(b) & absMask;

    // NaN / anything = qNaN
    if (aAbs > infRep)
      return fromRep(toRep(a) | quietBit);
    // anything / NaN = qNaN
    if (bAbs > infRep)
      return fromRep(toRep(b) | quietBit);

    if (aAbs == infRep) {
      // infinity / infinity = NaN
      if (bAbs == infRep)
        return fromRep(qnanRep);
      // infinity / anything else = +/- infinity
      else
        return fromRep(aAbs | quotientSign);
    }

    // anything else / infinity = +/- 0
    if (bAbs == infRep)
      return fromRep(quotientSign);

    if (!aAbs) {
      // zero / zero = NaN
      if (!bAbs)
        return fromRep(qnanRep);
      // zero / anything else = +/- zero
      else
        return fromRep(quotientSign);
    }
    // anything else / zero = +/- infinity
    if (!bAbs)
      return fromRep(infRep | quotientSign);

    // One or both of a or b is denormal.  The other (if applicable) is a
    // normal number.  Renormalize one or both of a and b, and set scale to
    // include the necessary exponent adjustment.
    if (aAbs < implicitBit)
      scale += normalize(&aSignificand);
    if (bAbs < implicitBit)
      scale -= normalize(&bSignificand);
  }

  // Set the implicit significand bit.  If we fell through from the
  // denormal path it was already set by normalize( ), but setting it twice
  // won't hurt anything.
  aSignificand |= implicitBit;
  bSignificand |= implicitBit;
  int quotientExponent = aExponent - bExponent + scale;
  // 0x7504F333 / 2^32 + 1 = 3/4 + 1/sqrt(2)

  // Align the significand of b as a Q31 fixed-point number in the range
  // [1, 2.0) and get a Q32 approximate reciprocal using a small minimax
  // polynomial approximation: reciprocal = 3/4 + 1/sqrt(2) - b/2.  This
  // is accurate to about 3.5 binary digits.
  uint32_t q31b = bSignificand << 8;
  uint32_t reciprocal = UINT32_C(0x7504f333) - q31b;

  // Now refine the reciprocal estimate using a Newton-Raphson iteration:
  //
  //     x1 = x0 * (2 - x0 * b)
  //
  // This doubles the number of correct binary digits in the approximation
  // with each iteration.
  uint32_t correction;
  correction = -((uint64_t)reciprocal * q31b >> 32);
  reciprocal = (uint64_t)reciprocal * correction >> 31;
  correction = -((uint64_t)reciprocal * q31b >> 32);
  reciprocal = (uint64_t)reciprocal * correction >> 31;
  correction = -((uint64_t)reciprocal * q31b >> 32);
  reciprocal = (uint64_t)reciprocal * correction >> 31;

  // Adust the final 32-bit reciprocal estimate downward to ensure that it is
  // strictly smaller than the infinitely precise exact reciprocal.  Because
  // the computation of the Newton-Raphson step is truncating at every step,
  // this adjustment is small; most of the work is already done.
  reciprocal -= 2;

  // The numerical reciprocal is accurate to within 2^-28, lies in the
  // interval [0x1.000000eep-1, 0x1.fffffffcp-1], and is strictly smaller
  // than the true reciprocal of b.  Multiplying a by this reciprocal thus
  // gives a numerical q = a/b in Q24 with the following properties:
  //
  //    1. q < a/b
  //    2. q is in the interval [0x1.000000eep-1, 0x1.fffffffcp0)
  //    3. The error in q is at most 2^-24 + 2^-27 -- the 2^24 term comes
  //       from the fact that we truncate the product, and the 2^27 term
  //       is the error in the reciprocal of b scaled by the maximum
  //       possible value of a.  As a consequence of this error bound,
  //       either q or nextafter(q) is the correctly rounded.
  rep_t quotient = (uint64_t)reciprocal * (aSignificand << 1) >> 32;

  // Two cases: quotient is in [0.5, 1.0) or quotient is in [1.0, 2.0).
  // In either case, we are going to compute a residual of the form
  //
  //     r = a - q*b
  //
  // We know from the construction of q that r satisfies:
  //
  //     0 <= r < ulp(q)*b
  //
  // If r is greater than 1/2 ulp(q)*b, then q rounds up.  Otherwise, we
  // already have the correct result.  The exact halfway case cannot occur.
  // We also take this time to right shift quotient if it falls in the [1,2)
  // range and adjust the exponent accordingly.
  rep_t residual;
  if (quotient < (implicitBit << 1)) {
    residual = (aSignificand << 24) - quotient * bSignificand;
    quotientExponent--;
  } else {
    quotient >>= 1;
    residual = (aSignificand << 23) - quotient * bSignificand;
  }

  const int writtenExponent = quotientExponent + exponentBias;

  if (writtenExponent >= maxExponent) {
    // If we have overflowed the exponent, return infinity.
    return fromRep(infRep | quotientSign);
  }

  else if (writtenExponent < 1) {
    if (writtenExponent == 0) {
      // Check whether the rounded result is normal.
      const bool round = (residual << 1) > bSignificand;
      // Clear the implicit bit.
      rep_t absResult = quotient & significandMask;
      // Round.
      absResult += round;
      if (absResult & ~significandMask) {
        // The rounded result is normal; return it.
        return fromRep(absResult | quotientSign);
      }
    }
    // Flush denormals to zero.  In the future, it would be nice to add
    // code to round them correctly.
    return fromRep(quotientSign);
  }

  else {
    const bool round = (residual << 1) > bSignificand;
    // Clear the implicit bit.
    rep_t absResult = quotient & significandMask;
    // Insert the exponent.
    absResult |= (rep_t)writtenExponent << significandBits;
    // Round.
    absResult += round;
    // Insert the sign and return.
    return fromRep(absResult | quotientSign);
  }
}

#if defined(__ARM_EABI__)
#if defined(COMPILER_RT_ARMHF_TARGET)
AEABI_RTABI fp_t __aeabi_fdiv(fp_t a, fp_t b) { return __divsf3(a, b); }
#else
COMPILER_RT_ALIAS(__divsf3, __aeabi_fdiv)
#endif
#endif


text:
typedef READ_HANDLER((* read_handler_t));
typedef WRITE_HANDLER((* write_handler_t));

void iic_read(int len);
void iic_write(void);

void print_byte(uint8_t x);

#endif


text:
<?php

namespace backend\modules\airexport\models;

use Yii;
use backend\modules\airexport\models\Jobsheet;
use backend\modules\masterdata\models\Company;
/**
 * This is the model class for table "debitnote".
 *
 * @property integer $debitnote_id
 * @property string $invoice_no
 * @property string $invoice_date
 * @property integer $jobs_id
 * @property integer $bl_id
 * @property string $due_date
 * @property string $term
 * @property string $tot_amount
 * @property integer $companyid
 * @property integer $insert_by
 * @property string $insert_date
 * @property integer $update_by
 * @property string $update_date
 * @property integer $active
 * @property string $sign
 * @property string $status
 * @property integer $invoice_id
 * @property integer $kindofexport
 */
class Debitnote extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'debitnote';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['invoice_no', 'bl_id', 'insert_by', 'insert_date', 'invoice_id'], 'required'],
            [['invoice_date', 'due_date', 'insert_date', 'update_date', 'jobs_id'], 'safe'],
            [['jobs_id', 'bl_id', 'companyid', 'insert_by', 'update_by', 'active', 'invoice_id', 'kindofexport'], 'integer'],
            [['tot_amount'], 'number'],
            [['status'], 'string'],
            [['invoice_no', 'term', 'sign'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'debitnote_id' => 'Debitnote ID',
            'invoice_no' => 'Invoice No',
            'invoice_date' => 'Invoice Date',
            'jobs_id' => 'Jobs ID',
            'bl_id' => 'Bl ID',
            'due_date' => 'Due Date',
            'term' => 'Term',
            'tot_amount' => 'Tot Amount',
            'companyid' => 'Companyid',
            'insert_by' => 'Insert By',
            'insert_date' => 'Insert Date',
            'update_by' => 'Update By',
            'update_date' => 'Update Date',
            'active' => 'Active',
            'sign' => 'Sign',
            'status' => 'Status',
            'invoice_id' => 'Invoice ID',
            'kindofexport' => 'Kindofexport',
        ];
    }

	/**
     * @return \yii\db\ActiveQuery
     */
    public function getJobsheetinfo()
    {
        return $this->hasOne(Jobsheet::className(), ['jobs_id' => 'jobs_id'])
                ->leftJoin('company', 'jobsheet.shipper = company.companyid');
                //->joinWith(['company', 'comments.fan']);
    }

    public function getTocompany()
    {
        return $this->hasOne(Company::className(), ['companyid' => 'companyid']);
    }
}


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

<title>CURLOPT_ACCEPTTIMEOUT_MS man page</title>
<meta name="generator" content="roffit">

NAME

CURLOPT_ACCEPTTIMEOUT_MS - timeout waiting for FTP server to connect back
SYNOPSIS

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
DESCRIPTION

Pass a long telling libcurl the maximum number of milliseconds to wait for a server to connect back to libcurl when an active FTP connection is used.
DEFAULT

60000 milliseconds
PROTOCOLS

FTP
EXAMPLE

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file");

  /* wait no more than 5 seconds for FTP server responses */
  curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);

  curl_easy_perform(curl);
}

AVAILABILITY

Added in 7.24.0
RETURN VALUE

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
SEE ALSO

CURLOPT_STDERR, CURLOPT_DEBUGFUNCTION

 This HTML page was made with roffit.


text:
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ebay.apis.eblbasecomponents;

import java.io.Serializable;
import com.leansoft.nano.annotation.*;

/**
 *
 * Contains an order or a transaction. A transaction is the sale of one or
 * more items from a seller's listing to a buyer. An order combines two or more transactions
 * into a single payment.
 *
 */
public class OrderTransactionType implements Serializable {

    private static final long serialVersionUID = -1L;

	@Element(name = "Order")
	private OrderType order;

	@Element(name = "Transaction")
	private TransactionType transaction;

	/**
     * public getter
     *
     *
     * Contains the information describing an order.
     *
     *
     * @returns ebay.apis.eblbasecomponents.OrderType
	 */
	public OrderType getOrder() {
	    return this.order;
	}

	/**
	 * public setter
	 *
     *
     * Contains the information describing an order.
     *
     *
     * @param ebay.apis.eblbasecomponents.OrderType
	 */
	public void setOrder(OrderType order) {
	    this.order = order;
	}
	/**
     * public getter
     *
     *
     * Contains the information describing a transaction.
     *
     *
     * @returns ebay.apis.eblbasecomponents.TransactionType
	 */
	public TransactionType getTransaction() {
	    return this.transaction;
	}

	/**
	 * public setter
	 *
     *
     * Contains the information describing a transaction.
     *
     *
     * @param ebay.apis.eblbasecomponents.TransactionType
	 */
	public void setTransaction(TransactionType transaction) {
	    this.transaction = transaction;
	}

}


text:
@echo off

if "%~1"=="" (
	echo -----------------------------------------------------
	echo Invalid parameter!
	echo -----------------------------------------------------
	echo Usage: FindText.bat file_name
	echo Example: FindText.bat "sample1.pdf"
	echo -----------------------------------------------------
	if not "%NOPAUSE%"=="1" pause
	exit /b 1
)

powershell -NoProfile -ExecutionPolicy Bypass -Command "& .\FindText.ps1" "%1"
echo Script finished with errorlevel=%errorlevel%

pause


text:
module Dlibhydra
  # local authorities terms defined in generic vocab
  module GenericAuthorityTerms
    extend ActiveSupport::Concern

    included do
      property :approved, predicate: Dlibhydra::Vocab::Generic.approved,
                          multiple: false do |index|
        index.as :stored_searchable
      end
      property :used, predicate: Dlibhydra::Vocab::Generic.used,
                      multiple: false do |index|
        index.as :stored_searchable
      end
      property :rules, predicate: Dlibhydra::Vocab::Generic.rules,
                       multiple: false do |index|
        index.as :stored_searchable
      end
    end
  end
end


text:
<?php

namespace MarmottaClient\Clients;

require_once 'model/content/Content.php';
require_once 'exceptions/MarmottaClientException.php';
require_once 'exceptions/NotFoundException.php';
require_once 'exceptions/ContentFormatException.php';

use \MarmottaClient\Model\Content\Content;
use \MarmottaClient\ClientConfiguration;

use \MarmottaClient\Exceptions\MarmottaClientException;
use \MarmottaClient\Exceptions\NotFoundException;
use \MarmottaClient\Exceptions\ContentFormatException;

use MarmottaClient\Model\RDF\Literal;
use MarmottaClient\Model\RDF\URI;
use MarmottaClient\Model\RDF\BNode;

use Guzzle\Http\Client;
use Guzzle\Http\Message\BadResponseException;

class ReasonerClient
{

    private static $URL_PROGRAM_SERVICE = "/reasoner/program";

    protected $config;

    function __construct(ClientConfiguration $config)
    {
        $this->config = $config;
    }

    /**
     * List all reasoner programs installed in the Marmotta knowledge base. Returns an array of maps of the form
     * array("name" => program name, "rules" => program string in KWRL syntax)
     *
     */
    public function listPrograms() {
        $client = new Client();
        $request = $client->get($this->getServiceUrl("list"),array(
            "User-Agent"   => "Marmotta Client Library (PHP)",
            "Accept" => "application/json"
        ));
        // set authentication if given in configuration
        if(!is_null($this->config->getUsername())) {
            $request->setAuth($this->config->getUsername(),$this->config->getPassword());
        }
        $response = $request->send();

        return json_decode($response->getBody(true),true);
    }

    /**
     * Upload a reasoner program to the Marmotta knowledge base and register it with the name given as argument.
     * The Marmotta will automatically trigger a full reasoning when the program has been uploaded successfully.
     * The reasoner program is a string in the KWRL Syntax described at http://code.google.com/p/kiwi/wiki/Reasoning
     *
     * @param $name
     * @param $program
     */
    public function uploadProgram($name, $program) {
        $client = new Client();
        $request = $client->post($this->getServiceUrl($name),array(
            "User-Agent"   => "Marmotta Client Library (PHP)",
            "Content-Type" => "text/plain"
        ),$program);
        // set authentication if given in configuration
        if(!is_null($this->config->getUsername())) {
            $request->setAuth($this->config->getUsername(),$this->config->getPassword());
        }
        $response = $request->send();
    }

    /**
     * Remove the reasoner program with the given name from the Marmotta knowledge base.
     * @param $name
     */
    public function deleteProgram($name) {
        $client = new Client();
        $request = $client->delete($this->getServiceUrl($name),array(
            "User-Agent"   => "Marmotta Client Library (PHP)"
        ));
        // set authentication if given in configuration
        if(!is_null($this->config->getUsername())) {
            $request->setAuth($this->config->getUsername(),$this->config->getPassword());
        }
        $response = $request->send();
    }

    private function getServiceUrl($suffix = 0) {
        $serviceUrl = $this->config->getBaseUrl() . ReasonerClient::$URL_PROGRAM_SERVICE .
            ($suffix ? "/" . urlencode($suffix) : "");
        return $serviceUrl;
    }

}
?>


text:
package utils;

import be.objectify.led.Property;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.Field;

/**
 * @author Steve Chaloner (steve@objectify.be).
 */
public class LedPropertyParser
{
    private static final Logger LOGGER = LoggerFactory.getLogger(LedPropertyParser.class);

    public static Object getPropertyValue(Object o,
                                          String propertyName)
    {
        Object propertyValue = null;
        Field[] fields = o.getClass().getDeclaredFields();
        try
        {
            for (int i = 0; propertyValue == null && i < fields.length; i++)
            {
                Field field = fields[i];
                if (field.isAnnotationPresent(Property.class))
                {
                    String propName = field.getAnnotation(Property.class).value();
                    if (propName.equals(propertyName))
                    {
                        propertyValue = field.get(o);
                    }
                }
            }
        }
        catch (IllegalAccessException e)
        {
            LOGGER.error("Unable to access field",
                         e);
        }

        return propertyValue;
    }
}


text:
@interface PodsDummy_Pods_VerticallyScrollingStatusView_Tests : NSObject
@end
@implementation PodsDummy_Pods_VerticallyScrollingStatusView_Tests
@end


text:
typedef struct TestPersistData {
  uint32_t foo;
  void *bar;
} TestPersistData;

static PersistStorage s_persist;

void setup_test(void) {
  interrupt_init();
  soft_timer_init();
  crc32_init();

  flash_init();
  flash_erase(TEST_PERSIST_FLASH_PAGE);
}

void teardown_test(void) {
  flash_erase(TEST_PERSIST_FLASH_PAGE);
}

void test_persist_new(void) {
  TestPersistData data = { .foo = 0x12345678, .bar = &s_persist };

  StatusCode ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);
}

void test_persist_load_existing(void) {
  TestPersistData data = { .foo = 0x12345678, .bar = &s_persist };

  LOG_DEBUG("Creating initial persist\n");
  StatusCode ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  // Force some extra commits to simulate multiple changes
  for (uint32_t i = 0; i < 4; i++) {
    data.foo += i;
    LOG_DEBUG("Forcing commit %" PRIu32 " to persist layer\n", i);
    ret = persist_commit(&s_persist);
    TEST_ASSERT_OK(ret);
  }

  LOG_DEBUG("Setting up new persist layer\n");
  TestPersistData new_data = { 0 };
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &new_data, sizeof(new_data), false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL(data.foo, new_data.foo);
  TEST_ASSERT_EQUAL(data.bar, new_data.bar);

  LOG_DEBUG("Committing new data\n");
  // Make sure we can commit data after reading a valid section
  new_data.foo = 0x87654321;
  new_data.bar = &new_data;
  ret = persist_commit(&s_persist);
  TEST_ASSERT_OK(ret);

  // Readback
  LOG_DEBUG("Reading back changed data\n");
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL(new_data.foo, data.foo);
  TEST_ASSERT_EQUAL(new_data.bar, data.bar);
}

void test_persist_full_page(void) {
  uint32_t data[64] = { 0 };
  for (size_t i = 0; i < SIZEOF_ARRAY(data); i++) {
    data[i] = i;
  }

  LOG_DEBUG("Initializing persist layer\n");
  StatusCode ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  // Should be able to persist more than the maximum number of sections
  for (size_t i = 0; i < FLASH_PAGE_BYTES / sizeof(data) + 1; i++) {
    LOG_DEBUG("Attempting commit %" PRIu32 "\n", (uint32_t)i);
    data[i] += i;
    ret = persist_commit(&s_persist);
    TEST_ASSERT_OK(ret);
  }

  // Should load post-erase properly
  LOG_DEBUG("Loading persist data\n");
  uint32_t new_data[SIZEOF_ARRAY(data)] = { 0 };
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &new_data, sizeof(new_data), false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL_HEX32_ARRAY(data, new_data, SIZEOF_ARRAY(data));
}

void test_persist_size_change(void) {
  uint32_t data[4] = { 0x1, 0x2, 0x3, 0x4 };
  LOG_DEBUG("Initializing persist layer with size %" PRIu32 "\n", (uint32_t)sizeof(data));
  StatusCode ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  uint32_t small_data[2] = { 0x4, 0x5 };
  LOG_DEBUG("Initializing persist layer with size %" PRIu32 "\n", (uint32_t)sizeof(small_data));
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &small_data, sizeof(small_data), false);
  TEST_ASSERT_NOT_OK(ret);

  // Make sure the mismatched blob data was not overwritten
  TEST_ASSERT_EQUAL(0x4, small_data[0]);
  TEST_ASSERT_EQUAL(0x5, small_data[1]);

  uint32_t readback_small[2] = { 0 };
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &readback_small, sizeof(readback_small),
                     false);
  TEST_ASSERT_NOT_OK(ret);

  TEST_ASSERT_EQUAL(0x0, readback_small[0]);
  TEST_ASSERT_EQUAL(0x0, readback_small[1]);

  // Switch back to larger data size
  LOG_DEBUG("Initializing persist layer with size %" PRIu32 "\n", (uint32_t)sizeof(data));
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL(data[0], 0x1);
  TEST_ASSERT_EQUAL(data[1], 0x2);
  TEST_ASSERT_EQUAL(data[2], 0x3);
  TEST_ASSERT_EQUAL(data[3], 0x4);

  LOG_DEBUG("Overwriting persist layer with size %" PRIu32 "\n", (uint32_t)sizeof(small_data));
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &small_data, sizeof(small_data), true);
  TEST_ASSERT_OK(ret);

  memset(readback_small, 0, sizeof(readback_small));
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &readback_small, sizeof(readback_small),
                     false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL(0x4, readback_small[0]);
  TEST_ASSERT_EQUAL(0x5, readback_small[1]);
}

void test_persist_change_periodic(void) {
  uint32_t data[4] = { 0 };
  LOG_DEBUG("Initializing persist layer with 0s\n");
  StatusCode ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  // Change the blob data
  for (size_t i = 0; i < SIZEOF_ARRAY(data); i++) {
    data[i] = i;
  }

  LOG_DEBUG("Data changed - delaying 2 periods (should only see 1 commit)\n");
  // Delay with some leeway - should only see 1 commit
  delay_ms(PERSIST_COMMIT_TIMEOUT_MS * 2 + 10);

  // Reload the persist layer
  LOG_DEBUG("Reloading persist layer\n");
  uint32_t readback[SIZEOF_ARRAY(data)] = { 0 };
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &readback, sizeof(readback), false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL_HEX32_ARRAY(data, readback, SIZEOF_ARRAY(data));
}

void test_persist_periodic_ctrl(void) {
  // Note that we don't really have a decent way of testing re-enabling periodic commits

  uint32_t data[4] = { 0 };
  LOG_DEBUG("Initializing persist layer with 0s\n");
  StatusCode ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &data, sizeof(data), false);
  TEST_ASSERT_OK(ret);

  LOG_DEBUG("Disabling periodic commit\n");
  ret = persist_ctrl_periodic(&s_persist, false);
  TEST_ASSERT_OK(ret);

  // Change the blob data
  for (size_t i = 0; i < SIZEOF_ARRAY(data); i++) {
    data[i] = i;
  }

  LOG_DEBUG("Data changed - delaying 2 periods (should see 0 commits)\n");
  // Delay with some leeway - should only see 1 commit
  delay_ms(PERSIST_COMMIT_TIMEOUT_MS * 2 + 10);

  // Reload the persist layer
  LOG_DEBUG("Reloading persist layer\n");
  uint32_t old_data[4] = { 0 };
  uint32_t readback[SIZEOF_ARRAY(data)] = { 0 };
  ret = persist_init(&s_persist, TEST_PERSIST_FLASH_PAGE, &readback, sizeof(readback), false);
  TEST_ASSERT_OK(ret);

  TEST_ASSERT_EQUAL_HEX32_ARRAY(old_data, readback, SIZEOF_ARRAY(old_data));
}


text:
package com.kodroid.pilot.lib.android.uiTypeHandler;

import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;

import com.kodroid.pilot.lib.android.stateFrameBacking.StateStackFrameBackedUI;
import com.kodroid.pilot.lib.statestack.StateStackFrame;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * Code to create and display an {@link View} for a {@link StateStackFrame} that is declared to be handled by this {@link StateStackFrameSetRendererView}
 */
public class StateStackFrameSetRendererView implements StateStackFrameSetRenderer
{
    private final ViewCreator viewCreator;
    private final Displayer displayer;
    private final boolean enableLogging;

    //==================================================================//
    // Constructor
    //==================================================================//

    /**
     * @param displayer A {@link StateStackFrameSetRendererView.Displayer} that will
     *                  handle showing your views. You can use the provided
     *                  {@link StateStackFrameSetRendererView.SimpleDisplayer} here if needed.
     */
    public StateStackFrameSetRendererView(
            ViewCreator viewCreator,
            Displayer displayer,
            boolean enableLogging)
    {
        this.viewCreator = viewCreator;
        this.displayer = displayer;
        this.enableLogging = enableLogging;
    }

    //==================================================================//
    // StateStackFrameSetRenderer Interface
    //==================================================================//

    @Override
    public boolean isFrameSupported(Class<? extends StateStackFrame> frameClass) {
        return viewCreator.isFrameHandled(frameClass);
    }

    @SuppressWarnings("unchecked")
    @Override
    public void renderFrame(StateStackFrame frame)
    {
        log("UITypeViewHandler:renderFrame(%s)", frame.toString());

        Class<? extends StateStackFrame> frameClass = frame.getClass();
        if(isFrameSupported(frameClass))
        {
            if(displayer.isViewAddedForFrameInstance(frame, viewCreator))
            {
                log("UITypeViewHandler:renderFrame(%s) already added", frame.toString());
            }
            else //view is not visible
            {
                log("UITypeViewHandler:renderFrame(%s) not added, adding new view", frame.toString());
                displayer.makeVisible(viewCreator.createViewForFrame(displayer.getDisplayConext(), frame));
            }
        }
        else
            throw new IllegalArgumentException("Frame type not supported. Use isFrameSupported() first!");
    }

    /**
     * Will return true for all views by default. Subclasses should override and return false for any non-opaque, non-fullscreen views.
     *
     * @param frame the frame being queried
     * @return true if the passed Frame is opaque
     */
    @Override
    public boolean isFrameOpaque(StateStackFrame frame) {
        return true;
    }

    @Override
    public void clearAllUI() {
        displayer.clearAllUI();
    }

    //==================================================================//
    // Logging
    //==================================================================//

    private void log(String format, String... args)
    {
        if(enableLogging)
        {
            Log.i("Pilot", String.format(format, args));
        }
    }

    //==================================================================//
    // Displayer Delegation
    //==================================================================//

    public static class ViewCreator
    {
        private Map<Class<? extends StateStackFrame>, Class<? extends View>> mappings = new HashMap<>();

        public ViewCreator(Map<Class<? extends StateStackFrame>, Class<? extends View>> mappings)
        {
            this.mappings = mappings;
        }

        private boolean isFrameHandled(Class<? extends StateStackFrame> pilotFrame)
        {
            return mappings.containsKey(pilotFrame);
        }

        /**
         * @param stateStackFrame the frame to get the View class for
         * @return Should always return a ViewClass or else throw an Exception
         */
        private Class<? extends View> getViewClassForFrame(StateStackFrame stateStackFrame)
        {
            for(Class<? extends StateStackFrame> forFrame: mappings.keySet())
            {
                if(forFrame.equals(stateStackFrame.getClass())) return mappings.get(forFrame);
            }

            throw new IllegalArgumentException(stateStackFrame.getClass()+" not supported");
        }

        /**
         * Return a new View instance, which has had the passed in {@link StateStackFrame} set.
         * @param stateStackFrame
         * @return
         */
        @SuppressWarnings("unchecked")
        private View createViewForFrame(Context context, StateStackFrame stateStackFrame)
        {
            View view = createView(context, getViewClassForFrame(stateStackFrame));
            ((StateStackFrameBackedUI)view).setBackingStateFrame(stateStackFrame);
            return view;
        }

        private <T extends View> T createView(Context context, Class<T> viewClass)
        {
            try
            {
                return viewClass.getConstructor(Context.class).newInstance(context);
            }
            catch (Exception e)
            {
                throw new RuntimeException(e);
            }
        }
    }

    /**
     * Integrators can supply their own Displayer or use/extend the suppled {@link StateStackFrameSetRendererView.SimpleDisplayer}
     */
    public interface Displayer
    {
        /**
         * Checking if added is enough as opposed to checking if a Frame has been set, as a View
         * should never have a null frame. Views have Frames attached on creation, and are not
         * recreated on config-change *unless* a child view of a Fragment.
         *
         * @param frame
         * @param viewCreator
         * @return
         */
        boolean isViewAddedForFrameInstance(StateStackFrame frame, ViewCreator viewCreator);
        void makeVisible(View newView);
        void clearAllUI();
        Context getDisplayConext();
    }

    /**
     * A simple implementation of the {@link Displayer} interface that can be setup with a managed root
     * view.
     *
     * This can be overridden if animations and or display logic needs to be tweaked. You may want to do this if
     *
     * - You have more that one {@link StateStackFrameSetRenderer} i.e. one for Views and one for FragmentDialogs and some UI syncronisation needs to take place between them.
     * - You have a master/detail flow and some subset of your views are to be placed in the detail area of the app (so you can manually handle this
     *
     * Otherwise you can roll your own via the {@link Displayer} interface.
     *
     * This will not work if rendering Views into a Fragment (see {@link Displayer}
     */
    public static class SimpleDisplayer implements Displayer
    {
        private FrameLayout rootViewGroup;

        public SimpleDisplayer(FrameLayout rootViewGroup)
        {
            this.rootViewGroup = rootViewGroup;
        }

        //============================//
        // Interface
        //============================//

        @Override
        public boolean isViewAddedForFrameInstance(StateStackFrame frame, ViewCreator viewCreator)
        {
            if(getCurrentView() == null) return false;
            final Class<? extends View> currentViewClass = getCurrentView().getClass();
            boolean isAdded = viewCreator.getViewClassForFrame(frame).equals(currentViewClass);
            if(isAdded && !((StateStackFrameBackedUI)getCurrentView()).hasBackingStateFrameSet())
                throw new IllegalStateException(
                        "Uh oh! This should not be possible. A View should never not have a Frame set " +
                                "apart from when first created, as on config change the view instance will " +
                                "NOT be persisted or automatically recreated by the system (default for " +
                                "programmatically added Views, unless contained withing a host Fragment), " +
                                "instead a new one will be created by Pilot and will still have UI-savedState " +
                                "restored as normal. ");
            return isAdded;
        }

        @Override
        public void makeVisible(View newView)
        {
            setCurrentView(newView);
        }

        @Override
        public void clearAllUI() {
            rootViewGroup.removeAllViews();
        }

        @Override
        public Context getDisplayConext()
        {
            return rootViewGroup.getContext();
        }

        //============================//
        // Protected
        //============================//

        /**
         * Subclasses could override this if want to specify animations etc. Need to be careful that
         * any overrides don`t introduce any race conditions that can arise from quick succession of
         * stack transitions. I.e. ensure that {@link #getCurrentView()} always does return the latest
         * view that has been added / set to be displayed.
         *
         * @param newView
         */
        protected void setCurrentView(View newView)
        {
            //for now we will do a crude add / remove but could animate etc
            rootViewGroup.removeAllViews();
            rootViewGroup.addView(newView);
        }

        /**
         * If overriding see {@link #setCurrentView(View)}
         *
         * @return
         */
        protected View getCurrentView()
        {
            //simple as setCurrentView is simple and non-animating (i.e. only ever one view present at a time)
            return rootViewGroup.getChildAt(0);
        }
    }

    /**
     * Animator that allows Animator defs to be used to declare view entry / exit animations.
     *
     * Note that if a View is scheduled to be removed and therefore being animated out by this class its
     * backing frame will no longer be on the stack. Make sure a view does not attempt to call into its
     * backing frame without checking this first otherwise button presses on out animations will crash.
     *
     * A LayoutTransition object would've been useful here if it did not cancel running animations when
     * Views are added / removed.
     *
     * This class can be improved by reversing the in anim if still running when the view is removed.
     * Alternatively Views should be visible for at least the min time that equals the in anim IN duration.
     */
    public static class AnimatingDisplayer implements StateStackFrameSetRendererView.Displayer
    {
        //==================================================================//
        // Builder
        //==================================================================//

        /**
         * Sets up a {@link StateStackFrameSetRendererView.Displayer} with simple fade in/out Animators.
         *
         * As mentioned in the class docs your Views should probably be around for at least
         * duration*2 otherwise quick transitions may cause unsightly animation combinations.
         *
         * @param rootViewGroup
         * @return
         */
        public static AnimatingDisplayer buildWithFade(FrameLayout rootViewGroup, int duration)
        {
            ObjectAnimator in = new ObjectAnimator();
            in.setFloatValues(0, 0, 1);
            //not using startDelay as no fillBefore
            in.setDuration(duration*2);
            in.setPropertyName("alpha");

            ObjectAnimator out = new ObjectAnimator();
            out.setFloatValues(1, 0);
            out.setDuration(duration);
            out.setPropertyName("alpha");

            return new AnimatingDisplayer(rootViewGroup, in, out);
        }

        //==================================================================//
        // Fields
        //==================================================================//

        private Set<View> animatingOutViews = new HashSet<>();

        private FrameLayout rootViewGroup;
        private final Animator animateIn;
        private final Animator animateOut;

        //==================================================================//
        // Constructor
        //==================================================================//

        public AnimatingDisplayer(
                FrameLayout rootViewGroup,
                Animator animateIn,
                Animator animateOut)
        {
            this.rootViewGroup = rootViewGroup;
            this.animateIn = animateIn;
            this.animateOut = animateOut;
        }

        @Override
        public boolean isViewAddedForFrameInstance(StateStackFrame frame, ViewCreator viewCreator)
        {
            if(getCurrentView() == null) return false;
            final Class<? extends View> currentViewClass = getCurrentView().getClass();
            boolean isAdded = viewCreator.getViewClassForFrame(frame).equals(currentViewClass);
            if(isAdded && !((StateStackFrameBackedUI)getCurrentView()).hasBackingStateFrameSet())
                throw new IllegalStateException(
                        "Uh oh! This should not be possible. A View should never not have a Frame set " +
                                "apart from when first created, as on config change the view instance will " +
                                "NOT be persisted or automatically recreated by the system (default for " +
                                "programmatically added Views, unless contained withing a host Fragment), " +
                                "instead a new one will be created by Pilot and will still have UI-savedState " +
                                "restored as normal. ");
            return isAdded;
        }

        @Override
        public void makeVisible(View newView)
        {
            setCurrentView(newView);
        }

        @Override
        public void clearAllUI() {
            animateOutViews(0);
        }

        @Override
        public Context getDisplayConext()
        {
            return rootViewGroup.getContext();
        }

        //==================================================================//
        // Private
        //==================================================================//

        /**
         * Subclasses could override this if want to specify animations etc. Need to be careful that
         * any overrides don`t introduce any race conditions that can arise from quick succession of
         * stack transitions. I.e. ensure that {@link #getCurrentView()} always does return the latest
         * view that has been added / set to be displayed.
         *
         * @param newView
         */
        private void setCurrentView(final View newView)
        {
            //animate in
            rootViewGroup.addView(newView, 0);
            Animator animInClone = animateIn.clone();
            animInClone.setTarget(newView);
            animInClone.start();

            //animate out all others
            animateOutViews(1);
        }

        private void animateOutViews(int startingIndex)
        {
            //animate all others out
            for(int i = startingIndex; i < rootViewGroup.getChildCount(); i++)
            {
                final View oldView = rootViewGroup.getChildAt(i);

                if(animatingOutViews.contains(oldView))
                    continue;
                else
                    animatingOutViews.add(oldView);

                Animator animOutClone = animateOut.clone();
                animOutClone.setTarget(oldView);
                animOutClone.addListener(new Animator.AnimatorListener()
                {
                    @Override
                    public void onAnimationStart(Animator animation){}

                    @Override
                    public void onAnimationEnd(Animator animation)
                    {
                        removeView();
                    }

                    @Override
                    public void onAnimationCancel(Animator animation)
                    {
                        removeView();
                    }

                    @Override
                    public void onAnimationRepeat(Animator animation){}

                    private void removeView()
                    {
                        animatingOutViews.remove(oldView);
                        if (rootViewGroup.indexOfChild(oldView) >= 0)
                            rootViewGroup.removeView(oldView);
                    }
                });
                animOutClone.start();
            }
        }

        /**
         * If overriding see {@link #setCurrentView(View)}
         *
         * @return
         */
        private View getCurrentView()
        {
            //we are always adding new views at 0 so we will just look at this
            return rootViewGroup.getChildAt(0);
        }
    }
}


text:
package io.pathfinder.websockets

import akka.actor.{Props, Actor, ActorRef}
import io.pathfinder.models.ModelId.{ClusterPath, CommodityId, TransportId}
import io.pathfinder.models.{Transport, Commodity}
import io.pathfinder.routing.Router
import play.api.Play
import io.pathfinder.websockets.ModelTypes.ModelType
import io.pathfinder.websockets.WebSocketMessage._
import io.pathfinder.websockets.pushing.PushSubscriber
import play.Logger
import io.pathfinder.websockets.controllers.{CommoditySocketController, ClusterSocketController, WebSocketController, VehicleSocketController}
import java.util.UUID
import scala.util.Try
import io.pathfinder.authentication.AuthServer
import scala.concurrent.ExecutionContext.Implicits.global
import play.api.libs.json.{JsSuccess, JsResult, Format, Json, JsValue, __}
import play.api.libs.functional.syntax._
import io.pathfinder.authentication.AuthenticationStatus

object WebSocketActor {
    private val authenticate = Play.current.configuration.getBoolean("Authenticate").getOrElse(false)

    val controllers: Map[ModelType, WebSocketController] = Map(
        ModelTypes.Transport -> VehicleSocketController,
        ModelTypes.Cluster -> ClusterSocketController,
        ModelTypes.Commodity -> CommoditySocketController
    )

    val observers: Map[ModelType, PushSubscriber] = Map(
        ModelTypes.Transport -> Transport.Dao,
        ModelTypes.Commodity -> Commodity.Dao
    )

    def props(out: ActorRef, app: String) = Props(new WebSocketActor(out, app, UUID.randomUUID().toString()))
}

/**
 * An actor that manages a websocket connection. It allows the client to make api calls as well as subscribe
 * to push notifications.
 */
class WebSocketActor (
    client: ActorRef,
    app: String,
    id: String
) extends Actor {
    import WebSocketActor.{controllers, observers, authenticate}

    def receive: Receive = {
        case Authenticate(opt) =>
            val res = AuthServer.connection(app, id, opt.getOrElse(false))
            res.onSuccess{ case x => client ! Authenticated(x); context.become(authenticated) }
            res.onFailure{ case e => Logger.error("Error from connection request", e); client ! Error(e.getMessage) }
        case m: WebSocketMessage => client ! Error("Not Authenticated")
    }

    private val authenticated: Receive = {
        case m: WebSocketMessage => Try{
            Logger.info("Received Socket Message " + m)
            m.withApp(app).getOrElse{
                Logger.info("Could not find app id " + app)
                client ! Error("Unable to parse cluster id")
            } match {
                case Route(id) =>
                    if(!Router.routeRequest(client, id)) {
                        client ! Error("could not get route, could not find "+ id.modelType + " with id: " + id.id)
                    }
                case RouteSubscribe(id) =>
                    if(Router.subscribeToRoute(client, id))
                        client ! RouteSubscribed(id).withoutApp
                    else
                        client ! Error("id: "+id.toString+" not found for model: "+id.modelType.toString)

                case Recalculate(cId) =>
                    Router.recalculate(client, cId)
                case c: ControllerMessage => controllers.get(c.model).flatMap(_.receive(c, app)).foreach(client ! _)

                case Subscribe(None, _model, Some(id)) =>
                    client ! {
                        id match {
                            case TransportId(vId) =>
                                observers(ModelTypes.Transport).subscribeById(vId, client)
                                Subscribed(None, None, Some(id)).withoutApp
                            case CommodityId(cId) =>
                                observers(ModelTypes.Commodity).subscribeById(cId, client)
                                Subscribed(None, None, Some(id)).withoutApp
                            case ClusterPath(path) =>
                                observers.values.foreach(_.subscribeByClusterPath(path, client))
                                Subscribed(Some(path), None, Some(id)).withoutApp
                            case _Else => Error("Only subscriptions to vehicles and commodities are supported")
                        }
                    }

                case Subscribe(Some(path), None, None) =>
                    observers.values.foreach(_.subscribeByClusterPath(path, client))
                    client ! Subscribed(Some(path), None, Some(ClusterPath(path)))

                case Subscribe(Some(path), Some(modelType), None) =>
                    client ! observers.get(modelType).map{ obs =>
                        obs.subscribeByClusterPath(path, client)
                        Subscribed(Some(path), Some(modelType), None).withoutApp
                    }.getOrElse(Error("Subscriptions to clusters by cluster not supported"))

                // unsubscribe from everything
                case Unsubscribe(None, None, None) =>
                    observers.foreach(_._2.unsubscribe(client))
                    client ! Unsubscribed(None,None,None).withoutApp

                // unsubscribe from a specified cluster
                case Unsubscribe(Some(cId), None, None) =>
                    observers.foreach(_._2.unsubscribeByClusterPath(cId, client))
                    client ! Unsubscribed(Some(cId),None,None).withoutApp

                // unsubscribe from cluster for models of a specified type
                case Unsubscribe(Some(cId), Some(model), None) =>
                    client ! observers.get(model).map {
                        obs =>
                            obs.unsubscribeByClusterPath(cId, client)
                            Unsubscribed(Some(cId), Some(model), None).withoutApp
                    }.getOrElse(Error("Cannot unsubscribe for model: "+model+" which has no support for subscriptions"))

                // unsibscribe from a single model
                case Unsubscribe(None, modelType, Some(id)) =>
                    client ! {
                        id match {
                            case TransportId(vId) =>
                                observers(ModelTypes.Transport).unsubscribeById(vId, client)
                                Unsubscribed(None, modelType, Some(id)).withoutApp
                            case CommodityId(cId) =>
                                observers(ModelTypes.Commodity).unsubscribeById(cId, client)
                                Unsubscribed(None, modelType, Some(id)).withoutApp
                            case ClusterPath(path) =>
                                observers.foreach(_._2.unsubscribeByClusterPath(path, client))
                                Unsubscribed(Some(path), None, None).withoutApp
                        }
                    }
                case u: Unsubscribe =>
                    client ! Error("An unsubscribe message must either have a model id and model type, cluster id and model type, a cluster id, or be empty")

                case UnknownMessage(value) => client ! Error("Received unknown message: " + value.toString)

                case e: Error => client ! e

                case x => client ! Error("received unhandled message: "+ x.toString)
            }
        }.recover{ case e =>
            e.printStackTrace()
            client ! Error("Unhandled Exception: " + e.getMessage + " : " + e.getStackTrace.mkString("\n\t"))
        }
    }

    // we could check application options here to see if they want authentication, for now we'll use application.conf
    if(authenticate) {
        client ! ConnectionId(id)
    } else {
        context.become(authenticated)
    }

}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.core.models;

import java.util.Arrays;
import java.util.List;
import java.util.function.Supplier;

/**
 * Helper methods when running geo tests.
 */
public class GeoTestHelpers {
    public static final Supplier<GeoPosition> PIKES_PLACE_POSITION = () ->
        new GeoPosition(-122.342148, 47.609657);

    public static final Supplier<GeoBoundingBox> PIKES_PLACE_BOUNDING_BOX = () ->
        new GeoBoundingBox(-122.349408, 47.604448, -122.334368, 47.610870);

    public static final Supplier<GeoPosition> MT_RAINIER_POSITION = () ->
        new GeoPosition(-121.726906, 46.879967, 4392D);

    public static final Supplier<GeoBoundingBox> MT_RAINIER_BOUNDING_BOX = () ->
        new GeoBoundingBox(-121.993999, 46.713820, -121.528334, 47.035690, 0D, 4500D);

    public static final List<GeoPosition> TRIANGLE_LINE_POSITIONS = Arrays.asList(
        new GeoPosition(0, 0), new GeoPosition(1, 1),
        new GeoPosition(0, 1), new GeoPosition(0, 0)
    );

    public static final Supplier<GeoLineString> TRIANGLE_LINE = () -> new GeoLineString(TRIANGLE_LINE_POSITIONS);

    public static final Supplier<GeoPolygon> TRIANGLE_POLYGON = () ->
        new GeoPolygon(new GeoLinearRing(TRIANGLE_LINE_POSITIONS));

    public static final List<GeoPosition> SQUARE_LINE_POSITIONS = Arrays.asList(
        new GeoPosition(0, 0), new GeoPosition(0, 1), new GeoPosition(1, 1),
        new GeoPosition(1, 0), new GeoPosition(0, 0)
    );

    public static final Supplier<GeoLineString> SQUARE_LINE = () -> new GeoLineString(SQUARE_LINE_POSITIONS);

    public static final Supplier<GeoPolygon> SQUARE_POLYGON = () ->
        new GeoPolygon(new GeoLinearRing(SQUARE_LINE_POSITIONS));

    public static final List<GeoPosition> RECTANGLE_LINE_POSITIONS = Arrays.asList(
        new GeoPosition(0, 0), new GeoPosition(0, 2), new GeoPosition(1, 2),
        new GeoPosition(1, 0), new GeoPosition(0, 0)
    );

    public static final Supplier<GeoLineString> RECTANGLE_LINE = () -> new GeoLineString(RECTANGLE_LINE_POSITIONS);

    public static final Supplier<GeoPolygon> RECTANGLE_POLYGON = () ->
        new GeoPolygon(new GeoLinearRing(RECTANGLE_LINE_POSITIONS));
}


text:
mintoweb
========

RESTFul Interface builder framework


text:
<!doctype html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="generator" content="PHPDoctor 2.0.5 (http://peej.github.com/phpdoctor/)">
<meta name="when" content="Fri, 16 Sep 2016 12:20:16 +0000">

<link rel="stylesheet" type="text/css" href="../../stylesheet.css">
<link rel="start" href="../../overview-summary.html">

<title>ActionOutScheduled (PHP GeodropSDK)</title>

PHP GeodropSDK

Overview

Namespace

Class

Tree

Files

Deprecated

Todo

Index

Frames
No frames

Summary: Field | Method | Constr
Detail: Field | Method | Constr

GeodropSDK\SMSOut\ActionOutScheduled

SMSOut/ActionOutScheduled.php at line 9

Class ActionOutScheduled

ActionOutScheduled

public  class ActionOutScheduled

Action attribute of the JOB tag in the Jobs Scheduled request

Author:

A-Tono s.r.l.

Since:

1.0

Constant Summary

final static  string

DELETE

To delete the job (the message will not be sent anymore)

final static  string

MODIFY

To modify the text, the recipient's list and the planned date and time

final static  string

STATUS

To get the job status, its description (text and recipient's list)
and the date and time planned for sending

Constant Detail

SMSOut/ActionOutScheduled.php at line 26

DELETE

public final static  string DELETE = "DELETE"

To delete the job (the message will not be sent anymore)

SMSOut/ActionOutScheduled.php at line 21

MODIFY

public final static  string MODIFY = "MODIFY"

To modify the text, the recipient's list and the planned date and time

SMSOut/ActionOutScheduled.php at line 16

STATUS

public final static  string STATUS = "STATUS"

To get the job status, its description (text and recipient's list)
and the date and time planned for sending

PHP GeodropSDK

Overview

Namespace

Class

Tree

Files

Deprecated

Todo

Index

Frames
No frames

Summary: Field | Method | Constr
Detail: Field | Method | Constr

This document was generated by PHPDoctor: The PHP Documentation Creator


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

    Copyright Terracotta, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.terracotta</groupId>
    <artifactId>platform-root</artifactId>
    <version>5.0-SNAPSHOT</version>
    <relativePath>../</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.terracotta.management</groupId>
  <artifactId>terracotta-management</artifactId>
  <packaging>pom</packaging>

  <modules>
    <module>sequence-generator</module>
    <module>management-model</module>
    <module>management-registry</module>
    <module>cluster-topology</module>
    <module>monitoring-service</module>
    <module>monitoring-service-entity</module>
    <module>management-registry-service</module>
    <module>management-entity</module>
    <module>tms-entity</module>
    <module>samples</module>
  </modules>

  <name>Terracotta Management</name>
  <description>A set of Java modules for management and monitoring, common to several Terracotta products</description>
  <url>https://github.com/Terracotta-OSS/terracotta-management/</url>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.6</java.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-toolchains-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <goals>
              <goal>toolchain</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <toolchains>
            <jdk>
              <version>${java.version}</version>
            </jdk>
          </toolchains>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.5.4</version>
        <executions>
          <execution>
            <id>generate-osgi-headers</id>
            <phase>package</phase>
            <goals>
              <goal>bundle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <!-- Profile to sign artifacts with a PGP key (using GPG). -->
      <id>sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.7</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>Terracotta Release Engineer</keyname>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <developers>
    <developer>
      <name>Ludovic Orban</name>
      <email>ludovic.orban@terracottatech.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Anthony Dahanne</name>
      <email>anthony.dahanne@softwareag.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
    <developer>
      <name>Mathieu Carbou</name>
      <email>mathieu.carbou@softwareag.com</email>
      <organization>Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.</organization>
      <organizationUrl>https://terracotta.org</organizationUrl>
    </developer>
  </developers>

</project>


text:
System.register(['./depcache2.js'], function(_export) {
  var dep;
  return {
    setters: [function (_dep) { dep = _dep.default }],
    execute: function () {
      _export('default', dep);
    }
  };
});


text:
jui.define("chart.brush.bar", [ "util.base" ], function(_) {

    /**
     * @class chart.brush.bar
	 *
     * @extends chart.brush.core
     */
	var BarBrush = function() {
		var g;
		var zeroX, height, half_height, bar_height;

		this.getBarStyle = function() {
			return {
				borderColor: this.chart.theme("barBorderColor"),
				borderWidth: this.chart.theme("barBorderWidth"),
				borderOpacity: this.chart.theme("barBorderOpacity"),
				borderRadius: this.chart.theme("barBorderRadius"),
				disableOpacity: this.chart.theme("barDisableBackgroundOpacity"),
				circleColor: this.chart.theme("barPointBorderColor")
			}
		}

		this.getBarElement = function(dataIndex, targetIndex, info) {
			var style = this.getBarStyle(),
				color = this.color(dataIndex, targetIndex),
				value = this.getData(dataIndex)[this.brush.target[targetIndex]];

			var r = this.chart.svg.pathRect({
				width: info.width,
				height: info.height,
				fill : color,
				stroke : style.borderColor,
				"stroke-width" : style.borderWidth,
				"stroke-opacity" : style.borderOpacity
			});

			if(value != 0) {
				this.addEvent(r, dataIndex, targetIndex);
			}

			if(this.barList == null) {
				this.barList = [];
			}

			this.barList.push(_.extend({
				element: r,
				color: color
			}, info));

			return r;
		}

		this.setActiveEffect = function(r) {
			var style = this.getBarStyle(),
				cols = this.barList;

			for(var i = 0; i < cols.length; i++) {
				var opacity = (cols[i] == r) ? 1 : style.disableOpacity;
				cols[i].element.attr({ opacity: opacity });

				if(cols[i].minmax) {
					cols[i].minmax.style(cols[i].color, style.circleColor, opacity);
				}
			}
		}

		this.drawBefore = function() {
			var op = this.brush.outerPadding,
				ip = this.brush.innerPadding,
				len = this.brush.target.length;

			g = this.chart.svg.group();
			zeroX = this.axis.x(0);
			height = this.axis.y.rangeBand();

			if(this.brush.size > 0) {
				bar_height = this.brush.size;
				half_height = (bar_height * len) + ((len - 1) * ip);
			} else {
				half_height = height - (op * 2);
				bar_height = (half_height - (len - 1) * ip) / len;
				bar_height = (bar_height < 0) ? 0 : bar_height;
			}
		}

		this.drawETC = function(group) {
			if(!_.typeCheck("array", this.barList)) return;

			var self = this,
				style = this.getBarStyle();

			// 액티브 툴팁 생성
			this.active = this.drawTooltip();
            group.append(this.active.tooltip);

			for(var i = 0; i < this.barList.length; i++) {
				var r = this.barList[i],
					d = this.brush.display;

				// Max & Min 툴팁 생성
				if((d == "max" && r.max) || (d == "min" && r.min) || d == "all") {
					r.minmax = this.drawTooltip(r.color, style.circleColor, 1);
					r.minmax.control(r.position, r.tooltipX, r.tooltipY, this.format(r.value));
                    group.append(r.minmax.tooltip);
				}

				// 컬럼 및 기본 브러쉬 이벤트 설정
				if(r.value != 0 && this.brush.activeEvent != null) {
					(function(bar) {
						self.active.style(bar.color, style.circleColor, 1);

						bar.element.on(self.brush.activeEvent, function(e) {
							self.active.style(bar.color, style.circleColor, 1);
							self.active.control(bar.position, bar.tooltipX, bar.tooltipY, self.format(bar.value));
							self.setActiveEffect(bar);
						});

						bar.element.attr({ cursor: "pointer" });
					})(r);
				}
			}

			// 액티브 툴팁 위치 설정
			var r = this.barList[this.brush.active];
			if(r != null) {
				this.active.style(r.color, style.circleColor, 1);
				this.active.control(r.position, r.tooltipX, r.tooltipY, this.format(r.value));
				this.setActiveEffect(r);
			}
		}

		this.draw = function() {
			var points = this.getXY(),
				style = this.getBarStyle();

			this.eachData(function(i, data) {
				var startY = this.offset("y", i) - (half_height / 2);

				for(var j = 0; j < this.brush.target.length; j++) {
					var value = data[this.brush.target[j]],
						tooltipX = this.axis.x(value),
						tooltipY = startY + (bar_height / 2),
						position = (tooltipX >= zeroX) ? "right" : "left";

                    // 최소 크기 설정
                    if(Math.abs(zeroX - tooltipX) < this.brush.minSize) {
                        tooltipX = (position == "right") ? tooltipX + this.brush.minSize : tooltipX - this.brush.minSize;
                    }

					var width = Math.abs(zeroX - tooltipX),
						radius = (width < style.borderRadius || bar_height < style.borderRadius) ? 0 : style.borderRadius,
                        r = this.getBarElement(i, j, {
							width: width,
							height: bar_height,
							value: value,
							tooltipX: tooltipX,
							tooltipY: tooltipY,
							position: position,
							max: points[j].max[i],
							min: points[j].min[i]
						});

					if(tooltipX >= zeroX) {
						r.round(width, bar_height, 0, radius, radius, 0);
						r.translate(zeroX, startY);
					} else {
						r.round(width, bar_height, radius, 0, 0, radius);
						r.translate(zeroX - width, startY);
					}

					// 그룹에 컬럼 엘리먼트 추가
					g.append(r);

					// 다음 컬럼 좌표 설정
					startY += bar_height + this.brush.innerPadding;
				}
			});

			this.drawETC(g);

            return g;
		}

		this.drawAnimate = function(root) {
			var svg = this.chart.svg,
				type = this.brush.animate;

			root.append(
				svg.animate({
					attributeName: "opacity",
					from: "0",
					to: "1",
					begin: "0s" ,
					dur: "1.4s",
					repeatCount: "1",
					fill: "freeze"
				})
			);

			root.each(function(i, elem) {
				if(elem.is("util.svg.element.path")) {
					var xy = elem.data("translate").split(","),
						x = parseInt(xy[0]),
						y = parseInt(xy[1]),
						w = parseInt(elem.attr("width")),
						start = (type == "right") ? x + w : x - w;

					elem.append(svg.animateTransform({
						attributeName: "transform",
						type: "translate",
						from: start + " " + y,
						to: x + " " + y,
						begin: "0s",
						dur: "0.7s",
						repeatCount: "1",
						fill: "freeze"
					}));
				}
			});
		}
	}

	BarBrush.setup = function() {
		return {
			/** @cfg {Number} [size=0] Set a fixed size of the bar. */
			size: 0,
            /** @cfg {Number} [minSize=0] Sets the minimum size as it is not possible to draw a bar when the value is 0. */
            minSize: 0,
            /** @cfg {Number} [outerPadding=2] Determines the outer margin of a bar.  */
			outerPadding: 2,
            /** @cfg {Number} [innerPadding=1] Determines the inner margin of a bar. */
			innerPadding: 1,
            /** @cfg {Number} [active=null] Activates the bar of an applicable index. */
			active: null,
            /** @cfg {String} [activeEvent=null]  Activates the bar in question when a configured event occurs (click, mouseover, etc). */
			activeEvent: null,
            /** @cfg {"max"/"min"/"all"} [display=null]  Shows a tool tip on the bar for the minimum/maximum value.  */
			display: null
		};
	}

	return BarBrush;
}, "chart.brush.core");


text:
/**
 * Network model entities & service API definitions.
 */
package org.onosproject.net;


text:
from django.db import models

class Message(models.Model):
    """An email message"""

    PRIORITY_HIGH = 1
    PRIORITY_MEDIUM = 2
    PRIORITY_LOW = 3
    PRIORITY_DEFERRED = 4

    PRIORITES = (
        (PRIORITY_HIGH, "high"),
        (PRIORITY_MEDIUM, "medium"),
        (PRIORITY_LOW, "low"),
        (PRIORITY_DEFERRED, "deferred"),
    )

    message_data = models.TextField()
    priority = models.PositiveSmallIntegerField(default=2)
    added = models.DateTimeField(auto_now_add=True)

    def defer(self):
        self.priority = self.PRIORITY_DEFERRED
        self.save()

    def __unicode__(self):
        return u"Message"

class MessageLog(models.Model):
    """A log of sent emails"""

    message_data = models.TextField()
    added = models.DateTimeField()
    priority = models.PositiveSmallIntegerField()

    attempted = models.DateTimeField(auto_now_add=True)
    message_id = models.CharField(blank=True, null=True, max_length=80)
    error_code = models.IntegerField(default=0)
    log_message = models.TextField(blank=True, null=True)

    def __unicode__(self):
        return u"MessageLog"


text:
import { ofType } from 'redux-observable'

import { POST } from '../../robot-api/constants'
import { mapToRobotApiRequest } from '../../robot-api/operators'

import * as Actions from '../actions'
import * as Constants from '../constants'

import type { Epic } from '../../types'

import type {
  ActionToRequestMapper,
  ResponseToActionMapper,
} from '../../robot-api/operators'

import type { SendModuleCommandAction } from '../types'

const mapActionToRequest: ActionToRequestMapper<SendModuleCommandAction> = action => ({
  method: POST,
  path: `${Constants.MODULES_PATH}/${action.payload.moduleId}`,
  body: {
    command_type: action.payload.command,
    args: action.payload.args,
  },
})

const mapResponseToAction: ResponseToActionMapper<SendModuleCommandAction> = (
  response,
  originalAction
) => {
  const { host, body, ...responseMeta } = response
  const { moduleId, command } = originalAction.payload
  const meta = { ...originalAction.meta, response: responseMeta }

  return response.ok
    ? Actions.sendModuleCommandSuccess(
        host.name,
        moduleId,
        command,
        body.returnValue,
        meta
      )
    : Actions.sendModuleCommandFailure(host.name, moduleId, command, body, meta)
}

export const sendModuleCommandEpic: Epic = (action$, state$) => {
  return action$.pipe(
    ofType(Constants.SEND_MODULE_COMMAND),
    mapToRobotApiRequest(
      state$,
      a => a.payload.robotName,
      mapActionToRequest,
      mapResponseToAction
    )
  )
}


text:
#ifndef __RECEIVER_H__
#define __RECEIVER_H__

class Receiver {
public:
    virtual ~Receiver() {}
    virtual int send_message(char* msg, int len) = 0;
};

#endif


text:
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class PopupWindow
    Inherits System.Windows.Forms.Form

    'Form 重写 Dispose,以清理组件列表。
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer

    '注意: 以下过程是 Windows 窗体设计器所必需的
    '可以使用 Windows 窗体设计器修改它。
    '不要使用代码编辑器修改它。
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.txtContent = New System.Windows.Forms.Label()
        Me.SuspendLayout()
        '
        'Timer1
        '
        '
        'txtContent
        '
        Me.txtContent.AutoSize = True
        Me.txtContent.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtContent.Location = New System.Drawing.Point(0, 0)
        Me.txtContent.Name = "txtContent"
        Me.txtContent.Size = New System.Drawing.Size(53, 12)
        Me.txtContent.TabIndex = 0
        Me.txtContent.Text = "消息内容"
        '
        'PopupWindow
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
        Me.ClientSize = New System.Drawing.Size(300, 116)
        Me.Controls.Add(Me.txtContent)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "PopupWindow"
        Me.ShowIcon = False
        Me.ShowInTaskbar = False
        Me.Text = "提示"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents Timer1 As Windows.Forms.Timer
    Friend WithEvents txtContent As Windows.Forms.Label
End Class


text:
namespace librealsense
{

    ////////////////////////////
    // Image size computation //
    ////////////////////////////

    size_t get_image_size(int width, int height, rs2_format format)
    {
        if (format == RS2_FORMAT_YUYV || (format == RS2_FORMAT_UYVY)) assert(width % 2 == 0);
        if (format == RS2_FORMAT_RAW10) assert(width % 4 == 0);
        return width * height * get_image_bpp(format) / 8;
    }

    int get_image_bpp(rs2_format format)
    {
        switch (format)
        {
        case RS2_FORMAT_Z16: return  16;
        case RS2_FORMAT_DISPARITY16: return 16;
        case RS2_FORMAT_DISPARITY32: return 32;
        case RS2_FORMAT_XYZ32F: return 12 * 8;
        case RS2_FORMAT_YUYV:  return 16;
        case RS2_FORMAT_RGB8: return 24;
        case RS2_FORMAT_BGR8: return 24;
        case RS2_FORMAT_RGBA8: return 32;
        case RS2_FORMAT_BGRA8: return 32;
        case RS2_FORMAT_Y8: return 8;
        case RS2_FORMAT_Y16: return 16;
        case RS2_FORMAT_RAW10: return 16; // return 16 bits instead of 10 bits in order to prevent allocated frame buffer size < actual data size.
        case RS2_FORMAT_Y10BPACK: return 16;
        case RS2_FORMAT_RAW16: return 16;
        case RS2_FORMAT_RAW8: return 8;
        case RS2_FORMAT_UYVY: return 16;
        case RS2_FORMAT_GPIO_RAW: return 1;
        case RS2_FORMAT_MOTION_RAW: return 1;
        case RS2_FORMAT_MOTION_XYZ32F: return 1;
        case RS2_FORMAT_6DOF: return 1;
        case RS2_FORMAT_MJPEG: return 8;
        case RS2_FORMAT_Y8I: return 16;
        case RS2_FORMAT_Y12I: return 24;
        case RS2_FORMAT_INZI: return 32;
        case RS2_FORMAT_INVI: return 16;
        case RS2_FORMAT_W10: return 32;
        case RS2_FORMAT_Z16H: return 16;
        case RS2_FORMAT_FG: return 16;
        case RS2_FORMAT_Y411: return 12;
        default: assert(false); return 0;
        }
    }

    //////////////////////////////////////
    // Frame rotation routines //
    //////////////////////////////////////
    resolution rotate_resolution(resolution res)
    {
        return resolution{ res.height , res.width};
    }

    resolution l500_confidence_resolution(resolution res)
    {
        return resolution{ res.height , res.width * 2 };
    }

}

#pragma pack(pop)


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true">
        <layer-list>
            <item>
                <shape android:shape="oval">
                    <size
                        android:width="40dp"
                        android:height="40dp"/>
                    <solid android:color="#40AA00AA"/>
                </shape>
            </item>
            <item
                android:bottom="16dp"
                android:left="16dp"
                android:right="16dp"
                android:top="16dp">
                <shape android:shape="oval">
                    <size
                        android:width="10dp"
                        android:height="10dp"/>
                    <solid android:color="#FFFF00FF"/>
                </shape>
            </item>
        </layer-list>
    </item>

    <!-- normal -->
    <item>
        <layer-list>
            <item
                android:bottom="16dp"
                android:left="16dp"
                android:right="16dp"
                android:top="16dp">
                <shape android:shape="oval">
                    <size
                        android:width="10dp"
                        android:height="10dp"/>
                    <solid android:color="#FFFF00FF"/>
                </shape>
            </item>
        </layer-list>
    </item>
</selector>


text:
#include <stdlib.h>
#include <stdio.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <fcntl.h>
#include "events.h"
#include "process_table.h"
#include "pmlheaders.h"
#include "graph_engine.h"
#include "process.h"
#include "unistd.h"

int create_process(char *model)
{
    int pid;
    int num_resources;
    peos_resource_t *resources;

    resources = (peos_resource_t *) peos_get_resource_list(model,&num_resources);

    if (resources == NULL) {
        printf("error getting resources\n");
	return -1;
    }

    printf("Executing %s:\n", model);

    if ((pid = peos_run(model,resources,num_resources)) < 0) {
	printf("couldn't create process\n");
	return -1;
    }
    else {
	printf("Created pid = %d\n", pid);
	return 1;
    }
}

int
main(int argc, char *argv[])
{
    FILE *fp,*fp1,*fp2,*fp3;

    peos_action_t *alist;
    int num_actions;
    int j;

    fprintf(stderr, "Testing list_action API ...\n");

    /*create model file */

    fp = fopen("test_list_action_API.pml", "w");
    fprintf(fp, "process p {\n");
    fprintf(fp, "action act_1 {\n");
    fprintf(fp, "requires {test_list_action_API_res1}\n");
    fprintf(fp, "provides {test_list_action_API_res2}}\n");
    fprintf(fp, "action act_2 {\n");
    fprintf(fp, "requires {test_list_action_API_res2}\n");
    fprintf(fp, "provides {test_list_action_API_res3}}\n");
    fprintf(fp, "action act_3 {\n");
    fprintf(fp, "requires {test_list_action_API_res3}\n");
    fprintf(fp, "provides {test_list_action_API_res4}}}\n");
    fclose(fp);

    unlink("proc_table.dat");
    unlink("proc_table.dat.xml");

    system("cat ./../peos_init.tcl > peos_init.tcl");

    /* Create a process */

    if (create_process("test_list_action_API.pml") < 0) {
        fprintf(stderr, "Error executing list instances API test\n");
        exit(EXIT_FAILURE);
    }

    /* bind resources */

    if (peos_set_resource_binding(0, "test_list_action_API_res1", "test_list_action_API_res1_val") < 0) {
        fprintf(stderr, "Error executing list instances API test\n");
        exit(EXIT_FAILURE);
    }

    if (peos_set_resource_binding(0, "test_list_action_API_res2", "test_list_action_API_res2_val") < 0) {
        fprintf(stderr, "Error executing list instances API test\n");
	exit(EXIT_FAILURE);
    }

    if (peos_set_resource_binding(0, "test_list_action_API_res3", "test_list_action_API_res3_val") < 0) {
        fprintf(stderr, "Error executing list instances API test\n");
        exit(EXIT_FAILURE);
    }

    /* create the resources so that their predicates evaluate to true */
    fp1 = fopen("test_list_action_API_res1_val", "w");
    fp2 = fopen("test_list_action_API_res2_val", "w");
    fp3 = fopen("test_list_action_API_res3_val", "w");
    fclose(fp1);
    fclose(fp2);
    fclose(fp3);

    /*
     *  now do list instances -- the process should be updated to make
     * actions act_1, act_2, and act_3 AVAILABLE
     *
     */

    alist = peos_list_actions(0,&num_actions);
    if(alist) {
        for(j = 0; j < num_actions; j++) {
            if(strcmp(alist[j].name,"act_1") == 0) {
	        if(alist[j].state != ACT_SATISFIED) {
		    fprintf(stderr, "LIST ACTION API TEST FAIL -- act_1 not READY");
		}
	    }

            if(strcmp(alist[j].name,"act_2") == 0) {
	        if(alist[j].state != ACT_SATISFIED) {
		    fprintf(stderr, "LIST ACTION API TEST FAIL -- act_2 not AVAILABLE");
		}
	    }

            if(strcmp(alist[j].name,"act_3") == 0) {
	        if(alist[j].state != ACT_AVAILABLE) {
		    fprintf(stderr, "LIST ACTION API TEST FAIL -- act_3 not AVAILABLE");
		}
	    }

        }
    }
    else {
        fprintf(stderr, "Error executing list instances API test\n");
	exit(EXIT_FAILURE);
    }

    /* clean up */

    unlink("test_list_action_API_res1_val");
    unlink("test_list_action_API_res2_val");
    unlink("test_list_action_API_res3_val");
    unlink("test_list_action_API.pml");

    unlink("proc_table.dat");
    unlink("proc_table.dat.xml");

    system("rm peos_init.tcl");

    fprintf(stderr, "done .. \n");
    return 0;

}


text:
def serving_size_calc(item_to_make, order_quantity)
  inventory = {"cookie" => 1, "cake" =>  5, "pie" => 7}
  error_counter = 3
  serving_size = inventory[item_to_make]
  inventory.each do |food|
    error_counter += -1 if inventory[food] != serving_size
  end

  raise ArgumentError.new("#{item_to_make} is not a valid input") unless error_counter <= 0

  serving_size_mod = order_quantity % serving_size
  leftover = order_quantity/serving_size

   if serving_size_mod == 0
     return "Calculations complete: Make #{leftover} of #{item_to_make}"
  else
     return "Calculations complete: Make #{leftover} of #{item_to_make}, you have #{serving_size_mod} leftover ingredients. Suggested baking items: TODO: MAKE THIS FEATURE"
  end
end
=begin

REFLECTION

What did you learn about making code readable by working on this challenge?
I learned that making code readable isn't just making lines shorter. It's also
making sure they are easy to follow for new fresh eyes.

Did you learn any new methods? What did you learn about them?
I didn't learn a new method, but I learned new ways to use methods
like != and +=

What did you learn about accessing data in hashes?
It's pretty important to keep track of which data set you are
going through.

What concepts were solidified when working through this challenge?
Nested hashes/arrays

=end