text:
package com.google.sps.gson;

import com.google.sps.data.ChromeOSDevice;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/*
 * Test the custom deserializer; assume that standard Gson functionality works properly.
 * Thus we only need to test deserializing the ChromeOSDevice and can assume the
 * ListDeviceResponse deserializes fine.
*/
@RunWith(JUnit4.class)
public final class JsonTest {

  @Test
  public void deserializeDevice() {
    String assetId = "ef249a";
    String location = "California";
    String user = "James";
    String deviceId = "93fc2a-c09afda81";
    String serialNumber = "SN11111";

    ChromeOSDevice expected =
        new ChromeOSDevice(assetId, location, user, deviceId, serialNumber);

    ChromeOSDevice actual = (ChromeOSDevice) Json.fromJson(
        "{\"annotatedAssetId\": \"" + assetId + "\", " +
        "\"annotatedLocation\": \"" + location + "\", " +
        "\"annotatedUser\": \"" + user + "\", " +
        "\"deviceId\": \"" + deviceId + "\", " +
        "\"serialNumber\": \"" + serialNumber + "\"}", ChromeOSDevice.class);

    Assert.assertEquals(expected, actual);
  }

  @Test
  public void deserializeDeviceMissingField(){
    String assetId = null;
    String location = "New Jersey";
    String user = null;
    String deviceId = "ae37f0-5bd7593ca";
    String serialNumber = "SN11111";

    ChromeOSDevice expected =
        new ChromeOSDevice(assetId, location, user, deviceId, serialNumber);

    ChromeOSDevice actual = (ChromeOSDevice) Json.fromJson(
        "{\"annotatedLocation\": \"" + location + "\", " +
        "\"deviceId\": \"" + deviceId + "\", " +
        "\"serialNumber\": \"" + serialNumber + "\"}", ChromeOSDevice.class);

    Assert.assertEquals(expected, actual);
  }

}


text:
require 'spec_helper'

describe SessionController do

  include AuthHelper
  extend FixtureHelper

  fixture_list account_fixtures, event_fixtures

  describe "GET show" do

    it "redirects to new when not logged in" do
      get :show
      response.should redirect_to(:action => "new")
    end

    it "redirects to accounts when admin" do
      login(admin_account)
      get :show
      response.should redirect_to(:controller => "accounts", :action => "index")
    end

    it "redirects to new client when guest and has single event" do
      login('War Practice Guest')
      get :show
      response.should redirect_to(new_event_client_path(events(:war_practice_2011)))
    end

   it "redirects to client list when herald and has single event" do
      login('herald')
      get :show
      response.should redirect_to(event_clients_path(events(:pennsic_40)))
    end

    it "otherwise redirects to events" do
      login("Senior")
      get :show
      response.should redirect_to(:controller => "events", :action => "index")
    end
   end

  describe "GET new" do
    it "shows the login view" do
      get :new
      response.should render_template(:login)
    end

    it "clears the session if logged in" do
      login("Pennsic Guest")
      get :new
      response.should be_ok
      session[:account].should be_nil
    end

    it "saves a last_url value" do
      url = "test/test"
      get :new, :return_to => url
      assigns(:login).last_url.should eq(url)
    end
  end

  describe "POST create" do

    it "rerenders login on invalid input" do
      post :create, :login => {:name => 'bad'}
      response.should render_template(:login)
      assigns(:login).errors.should_not be_empty
      session[:account].should be_nil
    end

    it "rerenders login on invalid password" do
      post :create, :login => {:name => "Pennsic", :password => "bad"}
      response.should render_template(:login)
      assigns(:login).errors.should_not be_empty
    end

    it "sets session on valid input" do
      account = accounts(:pennsic)
      post :create, :login => {:name => account.name, :password => "pennsic_pwd"}
      session[:account].should eq(account.id)
    end

    it "redirects to last_url on valid input" do
      account = accounts(:pennsic)
      url = "http://www.test.com"
      post :create, :login => {:name => account.name, :password => "pennsic_pwd",
        :last_url => url}
      response.should redirect_to(url)
    end

    it "redirects to '/session' when last_url does not exist" do
      account = accounts(:admin)
      post :create, :login => {:name => account.name, :password => "admin_pwd"}
      response.should redirect_to(:action => :show)
    end
  end

  describe "DELETE destory" do

  end
end

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

  <title>Testing Countdown Timers</title>

						<canvas id="ce-days" width="408" height="408"></canvas>

							32
							Days

						<canvas id="ce-hours" width="408" height="408"></canvas>

							9
							Hours

						<canvas id="ce-minutes" width="408" height="408"></canvas>

							8
							Minutes

						<canvas id="ce-seconds" width="408" height="408"></canvas>

							42
							Seconds


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Etienne THIERY's homepage">
    <meta name="author" content="Etienne THIERY">

    <title>AI Nanodegree by Etienne THIERY</title>

    <link rel="stylesheet" href="../css/bootstrap.min.css" type="text/css">

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Merriweather:400,300,300italic,400italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css" type="text/css">

    <link rel="stylesheet" href="../css/animate.min.css" type="text/css">

    <link rel="stylesheet" href="../css/creative.css" type="text/css">

		<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>
                cd ~

In short

In parallel with my Master's final internship, I am currently taking a 6 month Udacity nanodegree on Artificial Intelligence. Recently, I have been fascinated by this field and the countless possibilites it offers. When Udacity announced this nanodegree, I jumped on the occasion, and got selected to be part of the first cohort of 500 students starting in January 2016. As I stated in the cover letter I joined to my application, I would really like to take AI techniques, apply them to something related to Sustainable Development, a domain usually left out because it is not the most profitable, and see what good can come from it!

The first term of the nanodegree covers the core principles of AI such as search, optimization, logic, planning, and probability. It seems strongly based on Peter Norvig's "Artificial Intelligence: A Modern Approach", which is an excellent textbook I have and use as a reference when needed. There is not much theory I am not already familiar with in this first trimester, but a great feature of Udacity nanodegrees is the projects designed by their teaching staff. I will be posting about them below when the time comes.

For the second term, I will have to choose one of three concentrations: Natural Language Processing, Computer Vision, and Speech Recognition. I am completely indecisive because I am interested in every single one so I might end up taking all three of them over 9 months instead of 3. Help me: what should I start with?

		Contact

</AI Nanodegree


text:
import test from 'tape-catch';
import {colorCategories} from '@deck.gl/carto';

const CATEGORIES_TEST_CASES = [
  {
    title: 'Feature 1',
    argument: {
      properties: {
        target: 'Category 1'
      }
    },
    result: [255, 0, 0]
  },
  {
    title: 'Feature 2',
    argument: {
      properties: {
        target: 'Category 2'
      }
    },
    result: [0, 255, 0]
  },
  {
    title: 'Feature 3',
    argument: {
      properties: {
        target: 'Category 3'
      }
    },
    result: [0, 0, 255]
  }
];

const ERROR_TEST_CASES_COLORS = [
  {
    title: 'Feature with invalid colors',
    domain: ['Category 1', 'Category 2', 'Category 3'],
    colors: null
  }
];

const ERROR_TEST_CASES_CATEGORIES = [
  {
    title: 'Feature with invalid domain',
    domain: -1,
    colors: 'Mint'
  }
];

test('colorCategories', t => {
  const colorCategoriesManual = colorCategories({
    attr: 'target',
    domain: ['Category 1', 'Category 2', 'Category 3'],
    colors: [[255, 0, 0], [0, 255, 0], [0, 0, 255]]
  });

  for (const tc of CATEGORIES_TEST_CASES) {
    const func = colorCategoriesManual(tc.argument);
    t.deepEqual(func, tc.result, `colorCategories ${tc.title} returned expected result`);
  }

  t.end();
});

test('colorCategories#invalidColorsArgument', t => {
  for (const tc of ERROR_TEST_CASES_COLORS) {
    t.throws(
      () =>
        colorCategories({
          attr: 'target',
          domain: tc.domain,
          colors: tc.colors
        }),
      `throws on invalid colors ${tc.colors}`
    );
  }

  t.end();
});

test('colorCategories#invalidCategoriesArgument', t => {
  for (const tc of ERROR_TEST_CASES_CATEGORIES) {
    t.throws(
      () =>
        colorCategories({
          attr: 'target',
          domain: tc.domain,
          colors: tc.colors
        }),
      `throws on invalid domain ${tc.domain}`
    );
  }

  t.end();
});


text:
<!DOCTYPE html><title>algorithm</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content=""><meta name="groc-document-path" content="algorithm"><meta name="groc-project-path" content="src/algorithm.coffee"><link rel="stylesheet" type="text/css" media="all" href="assets/style.css">

src/algorithm.coffee

utils = require './utils'
request = require 'request'
Q = require 'q'

module.exports =

Find path

Details

neo
.findPath(1, {
    "to" : "http://localhost:7474/db/data/node/43",
    "max_depth" : 3,
    "relationships" : {
        "type" : "to",
        "direction" : "out"
    },
    "algorithm" : "shortestPath"
})

    findPath: (nodeId, params) ->
        utils.post(
            "#{@url}/db/data/node/#{nodeId}/paths"
            params
            (result) -> result.body
        )


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context=".NfcClearTag"
    tools:showIn="@layout/activity_update_password">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Place the Tag to clear it"
        android:id="@+id/textView4"
        android:height="100dp"
        android:textSize="30dp"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />
</RelativeLayout>


text:
using DereTore.Exchange.Archive.ACB.Serialization;

namespace DereTore.Apps.AcbMaker.Cgss {
    public sealed class HeaderTable : UtfRowBase {

        [UtfField(0)]
        public uint FileIdentifier;
        [UtfField(1)]
        public uint Size;
        [UtfField(2)]
        public uint Version;
        [UtfField(3)]
        public byte Type;
        [UtfField(4)]
        public byte Target;
        [UtfField(5)]
        public byte[] AcfMd5Hash;
        [UtfField(6)]
        public byte CategoryExtension;
        [UtfField(7)]
        public CueTable[] CueTable;
        [UtfField(8)]
        public CueNameTable[] CueNameTable;
        [UtfField(9)]
        public WaveformTable[] WaveformTable;
        // These are empty tables. They are treated as empty data fields.
        [UtfField(10)]
        public byte[] AisacTable;
        [UtfField(11)]
        public byte[] GraphTable;
        [UtfField(12)]
        public byte[] GlobalAisacReferenceTable;
        [UtfField(13)]
        public byte[] AisacNameTable;
        [UtfField(14)]
        public SynthTable[] SynthTable;
        [UtfField(15)]
        public CommandTable[] CommandTable;
        [UtfField(16)]
        public TrackTable[] TrackTable;
        [UtfField(17)]
        public SequenceTable[] SequenceTable;
        [UtfField(18)]
        public byte[] AisacControlNameTable;
        [UtfField(19)]
        public byte[] AutoModulationTable;
        [UtfField(20)]
        public byte[] StreamAwbTocWorkOld;
        [UtfField(21)]
        [Afs2Archive]
        public byte[] AwbFile;
        [UtfField(22)]
        public string VersionString;
        [UtfField(23)]
        public byte[] CueLimitWorkTable;
        [UtfField(24)]
        public ushort NumCueLimitListWorks;
        [UtfField(25)]
        public ushort NumCueLimitNodeWorks;
        [UtfField(26)]
        public byte[] AcbGuid;
        [UtfField(27)]
        public byte[] StreamAwbHash;
        [UtfField(28)]
        public byte[] StreamAwbTocWork_Old;
        [UtfField(29)]
        public float AcbVolume;
        [UtfField(30)]
        public byte[] StringValueTable;
        [UtfField(31)]
        public byte[] OutsideLinkTable;
        [UtfField(32)]
        public byte[] BlockSequenceTable;
        [UtfField(33)]
        public byte[] BlockTable;
        [UtfField(34)]
        public string Name;
        [UtfField(35)]
        public byte CharacterEncodingType;
        [UtfField(36)]
        public byte[] EventTable;
        [UtfField(37)]
        public byte[] ActionTrackTable;
        [UtfField(38)]
        public AcfReferenceTable[] AcfReferenceTable;
        [UtfField(39)]
        public byte[] WaveformExtensionDataTable;
        [UtfField(40)]
        public byte[] BeatSyncInfoTable;
        [UtfField(41)]
        public byte CuePriorityType;
        [UtfField(42)]
        public ushort NumCueLimit;
        [UtfField(43)]
        public byte R17;
        [UtfField(44)]
        public byte R16;
        [UtfField(45)]
        public byte R15;
        [UtfField(46)]
        public byte R14;
        [UtfField(47)]
        public byte R13;
        [UtfField(48)]
        public byte R12;
        [UtfField(49)]
        public byte R11;
        [UtfField(50)]
        public byte R10;
        [UtfField(51)]
        public byte R9;
        [UtfField(52)]
        public byte R8;
        [UtfField(53)]
        public byte R7;
        [UtfField(54)]
        public byte R6;
        [UtfField(55)]
        public byte R5;
        [UtfField(56)]
        public byte R4;
        [UtfField(57)]
        public byte R3;
        [UtfField(58)]
        public byte R2;
        [UtfField(59)]
        public byte R1;
        [UtfField(60)]
        public byte R0;
        [UtfField(61)]
        public byte[] PaddingArea;
        [UtfField(62)]
        public byte[] StreamAwbTocWork;
        [UtfField(63)]
        public byte[] StreamAwbAfs2Header;

    }
}


text:
package com.pureperfect.purview.i18n;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.StringTokenizer;

import com.pureperfect.purview.util.ReflectionUtils;

/**
 * YALE stands for Yet Another Language for Expressions. YALE is an attempt at
 * speeding up interpolation of expressions by making the expression language as
 * simple as possible. While YALE is not as dumb as some Yale graduates, it
 * is not very smart either. It only supports execution of methods that take
 * zero parameters. As far as I can tell however, it remains the world's fastest
 * expression engine. Like the JEXL expression engine, expressions should be
 * escaped using ${} and the problem should be referenced in the message
 * template using the identifier problem.
 *
 *

 * For Example:
 *

 *
 *

 * If the problem has a method called getEmail() that returns a
 * value of "abademailaddress ", then evaluating the String
 * "${problem.getEmail} is not a valid email
 * address" would result in the phrase
 * "abademailaddress is not a valid email address."
 *

 *
 * @author J. Chris Folsom
 * @version 1.1
 * @since 1.0
 */
public class YALEExpressionEngine implements ExpressionEngine
{
	private static YALEExpressionEngine defaultInstance = new YALEExpressionEngine();

	private static final Class<?>[] NO_ARGS = new Class<?>[]
	{};

	private static final int STATE_IN_EXPRESSION = 0;

	private static final int STATE_OUT_OF_EXPRESSION = 1;

	/**
	 * Singleton instance.
	 *
	 * @return Singleton instance.
	 */
	public static YALEExpressionEngine defaultInstance()
	{
		return defaultInstance;
	}

	/*
	 * Evaluate the given expression on the given object and return the results
	 * of the expression.
	 */
	private static Object evaluate(final Object problem, final String expression)
			throws SecurityException, NoSuchMethodException,
			IllegalArgumentException, IllegalAccessException,
			InvocationTargetException
	{
		final StringTokenizer tok = new StringTokenizer(expression, ".");

		Object result = problem;

		if (tok.hasMoreTokens())
		{
			final String problemToken = tok.nextToken();

			if ("problem".equals(problemToken))
			{
				while (tok.hasMoreTokens())
				{
					final String nextMethodName = tok.nextToken();

					final Class<?> clazz = result.getClass();
					final Method method = clazz.getMethod(nextMethodName,
							NO_ARGS);

					if (method != null)
					{
						result = ReflectionUtils.getValueOfMethod(method,
								result);
					}
					else
					{
						break;
					}
				}
			}
		}

		return result;
	}

	private YALEExpressionEngine()
	{
		// singleton
	}

    /**
     * {@inheritDoc}
     */
	public String eval(final String messageTemplate, final Object problem)
	{
		try
		{
			final StringBuilder results = new StringBuilder(
					messageTemplate.length());

			int state = STATE_OUT_OF_EXPRESSION;
			int expStartIndex = 0;

			/*
			 * So you may have guessed that writing compilers is not my strong
			 * suit. Okay so this isn't exactly the fastest or most attractive
			 * code in the world, but it solved the problem in a hurry and
			 * didn't require much of a state machine. If you think my code
			 * sucks, at least I got it working in 30 minutes. If you think you
			 * can do better please send me a patch.
			 */
			for (int i = 0, length = messageTemplate.length(); i < length; ++i)
			{
				final char current = messageTemplate.charAt(i);
				char nextChar = 0x0000;

				if (i + 1 < length)
				{
					nextChar = messageTemplate.charAt(i + 1);
				}

				switch (state)
				{
					case STATE_IN_EXPRESSION:
						if (nextChar == '}')
						{
							final String found = messageTemplate.substring(
									expStartIndex, ++i);

							final Object result = evaluate(problem, found);

							results.append(result);
							state = STATE_OUT_OF_EXPRESSION;
						}

						break;
					default:
						// Start expression
						if (current == '$' && nextChar == '{')
						{
							// skip $ and {
							++i;
							expStartIndex = ++i;
							state = STATE_IN_EXPRESSION;
						}
						else
						{
							results.append(current);
						}

						break;
				}
			}

			/*
			 * append the entire escape just incase they left it open, so
			 * ${problem.value gets printed in the results if there is no
			 * closing brace;
			 */
			if (state == STATE_IN_EXPRESSION)
			{
				final String openExpression = messageTemplate.substring(
						expStartIndex - 2, messageTemplate.length());

				throw new InterpolationException(openExpression);
			}

			return results.toString();
		}
		catch (final Throwable t)
		{
			throw new InterpolationException(t);
		}
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Gyalecta chlorobaea Nyl.

### Remarks
null


text:
package com.gooddata.agent;

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

public interface Collector {

	public abstract void add(String inputDir, String wildcard)
			throws IOException;

	public abstract void add(File inputDir, String wildcard) throws IOException;

	/**
	 * @return map of local files to remote file names
	 * @throws IOException
	 */
	public abstract Map<File, String> collect() throws IOException;

	public String getMainFile();

}


text:
@interface CustomCell5 : UICollectionViewCell <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) IBOutlet UICollectionView *collectionView;
@property (nonatomic, strong) IBOutlet UILabel *nameLbl;
@property (nonatomic, strong) IBOutlet UILabel *shoeSizeLbl;
@property (nonatomic, readonly) NSInteger shoeSize;

- (void)setupCell:(Person *)person;

@end


text:
	<button md-raised-button color="primary" on-click="saveAssessment()" style="line-height:30px;">Save</button>

		<md-checkbox [(ngModel)]="toggle.temporary_vndb" title="Toogle to enable VNDB vote and status update">VNDB Push</md-checkbox>

	<button md-icon-button [mdMenuTriggerFor]="menu" style="position:relative;margin:0 18px;">
		<md-icon>more_vert</md-icon>
	</button>
	<md-menu #menu="mdMenu">
		<button md-menu-item ngxClipboard [cbContent]="vn.title_original">
			<md-icon>content_copy</md-icon>
			Copy original title to clipboard
		</button>
	</md-menu>

			<md-card fxFlex="45" class="date-card">
				<md-card-header>
					<md-card-title class="date-card-title">

Date Start

						<md-chip-list>
							<ng-template [ngIf]="assessment.date_start">
								<md-chip selected="true" color="primary" style="line-height:9px;">✓ Assigned</md-chip>
							</ng-template>
						</md-chip-list>
					</md-card-title>
					<md-card-subtitle>
						Entering the world
					</md-card-subtitle>
				</md-card-header>
				<md-card-content style="padding: 20px 0;">
					<md-input-container>
						<input mdInput placeholder="Date Start" [(ngModel)]="assessment_local.date_start">
					</md-input-container>
					<button md-button (click)="dateStartNow()">Now</button>

					<md-slide-toggle [(ngModel)]="has_change.date_start">Apply change</md-slide-toggle>
				</md-card-content>
			</md-card>

			<md-card fxFlex="45" class="date-card">
				<md-card-header>
					<md-card-title class="date-card-title">

Date End

						<md-chip-list>
							<ng-template [ngIf]="assessment.date_end">
								<md-chip selected="true" color="primary" style="line-height:9px;">✓ Assigned</md-chip>
							</ng-template>
						</md-chip-list>
					</md-card-title>
					<md-card-subtitle>
						Accomplishing the world
					</md-card-subtitle>
				</md-card-header>
				<md-card-content style="padding: 20px 0;">
					<md-input-container>
						<input mdInput placeholder="Date End" [(ngModel)]="assessment_local.date_end">
					</md-input-container>
					<button md-button (click)="dateEndNow()">Now</button>

					<md-slide-toggle [(ngModel)]="has_change.date_end">Apply change</md-slide-toggle>
				</md-card-content>
			</md-card>

		<md-select placeholder="Node" [(ngModel)]="assessment.node" (ngModelChange)="assessment.node = $event" name="node">
			<md-option value="vn">VN</md-option>
			<md-option value="h">H</md-option>
			<md-option value="hrpg">HRPG</md-option>
			<md-option value="rpg">RPG</md-option>
		</md-select>

		<md-select placeholder="Status" [(ngModel)]="assessment.status" (ngModelChange)="assessment.status = $event" name="status">
			<md-option value="finished">Fin</md-option>
			<md-option value="halted">Halt</md-option>
			<md-option value="decomposed">Decompose</md-option>
		</md-select>

				Story
				Naki
				Nuki
				Comedy
				Graphic

					<md-radio-group [(ngModel)]="assessment.score_story" class="score-radio-group">
						<md-radio-button value="s">S</md-radio-button>
						<md-radio-button value="a">A</md-radio-button>
						<md-radio-button value="b">B</md-radio-button>
						<md-radio-button value="c">C</md-radio-button>
						<md-radio-button value="d">D</md-radio-button>
						<md-radio-button value="e">E</md-radio-button>
					</md-radio-group>

					<md-radio-group [(ngModel)]="assessment.score_naki" class="score-radio-group">
						<md-radio-button value="s">S</md-radio-button>
						<md-radio-button value="a">A</md-radio-button>
						<md-radio-button value="b">B</md-radio-button>
						<md-radio-button value="c">C</md-radio-button>
						<md-radio-button value="d">D</md-radio-button>
						<md-radio-button value="e">E</md-radio-button>
					</md-radio-group>

					<md-radio-group [(ngModel)]="assessment.score_nuki" class="score-radio-group">
						<md-radio-button value="s">S</md-radio-button>
						<md-radio-button value="a">A</md-radio-button>
						<md-radio-button value="b">B</md-radio-button>
						<md-radio-button value="c">C</md-radio-button>
						<md-radio-button value="d">D</md-radio-button>
						<md-radio-button value="e">E</md-radio-button>
					</md-radio-group>

					<md-radio-group [(ngModel)]="assessment.score_comedy" class="score-radio-group">
						<md-radio-button value="s">S</md-radio-button>
						<md-radio-button value="a">A</md-radio-button>
						<md-radio-button value="b">B</md-radio-button>
						<md-radio-button value="c">C</md-radio-button>
						<md-radio-button value="d">D</md-radio-button>
						<md-radio-button value="e">E</md-radio-button>
					</md-radio-group>

					<md-radio-group [(ngModel)]="assessment.score_graphic" class="score-radio-group">
						<md-radio-button value="s">S</md-radio-button>
						<md-radio-button value="a">A</md-radio-button>
						<md-radio-button value="b">B</md-radio-button>
						<md-radio-button value="c">C</md-radio-button>
						<md-radio-button value="d">D</md-radio-button>
						<md-radio-button value="e">E</md-radio-button>
					</md-radio-group>

		<md-select placeholder="Overall" [(ngModel)]="assessment.score_all" (ngModelChange)="assessment.score_all = $event" name="overall">
			<ng-template ngFor let-val [ngForOf]="[10,9,8,7,6,5,4,3,2,1]">
				<md-option [value]="val">{{val}}</md-option>
			</ng-template>
			<md-option [value]="0">0</md-option>
		</md-select>

					<md-select placeholder="Savable" [(ngModel)]="assessment.savable" (ngModelChange)="assessment.savable = $event" name="savable">
						<md-option value="unknown">Unknown</md-option>
						<md-option value="yes">Savable</md-option>
						<md-option value="no">No save</md-option>
					</md-select>

					<md-slide-toggle [(ngModel)]="assessment.archive_savedata">Save Data</md-slide-toggle>

Search Assistance

		<md-chip-list class="mat-chip-list-stacked">
			<ng-template [ngIf]="vn.vndb_vn_id">

				<md-chip selected="true" color="" class="external-link-chip">
					Open in VNDB
					〉〉
				</md-chip>

			</ng-template>
			<ng-template [ngIf]="vn.erogamescape_game_id">

				<md-chip selected="true" color="" class="external-link-chip">
					EGSに開く
					〉〉
				</md-chip>

			</ng-template>

				<md-chip selected="true" color="" class="external-link-chip">
					攻略を探す
					〉〉
				</md-chip>

				<md-chip selected="true" color="" class="external-link-chip">
					セーフデータを探す
					〉〉
				</md-chip>

				<md-chip selected="true" color="" class="external-link-chip">
					キャラクターデータを探す
					〉〉
				</md-chip>

				<md-chip selected="true" color="" class="external-link-chip">
					 パッチを探す
					〉〉
				</md-chip>

				<md-chip selected="true" color="" class="external-link-chip">
					 聖封パッチを探す
					〉〉
				</md-chip>

				<md-chip selected="true" color="" class="external-link-chip">
					 NoDVDパッチを探す
					〉〉
				</md-chip>

				<md-chip selected="true" color="" class="external-link-chip">
					 認証回避を探す
					〉〉
				</md-chip>

		</md-chip-list>


text:
typedef void(^LoadExperimentsCompleteHandler)(NSArray *);

@interface ExperimentDataSource : NSObject

+ (ExperimentDataSource *)sharedDataSource;
- (void)loadExperimentsComplete:(LoadExperimentsCompleteHandler)completeHandler;

@end


text:
package job

import (
	"testing"
	"time"

	"github.com/cenk/backoff"
)

func TestJobBackOff(t *testing.T) {
	var (
		testInitialInterval     = 500 * time.Millisecond
		testRandomizationFactor = 0.1
		testMultiplier          = 2.0
		testMaxInterval         = 5 * time.Second
		testMinJobInterval      = 1 * time.Second
	)

	exp := NewBackOff(backoff.NewExponentialBackOff())
	exp.InitialInterval = testInitialInterval
	exp.RandomizationFactor = testRandomizationFactor
	exp.Multiplier = testMultiplier
	exp.MaxInterval = testMaxInterval
	exp.MinJobInterval = testMinJobInterval
	exp.Reset()

	var expectedResults = []time.Duration{500, 500, 500, 1000, 2000, 4000, 5000, 5000, 500, 1000, 2000, 4000, 5000, 5000}
	for i, d := range expectedResults {
		expectedResults[i] = d * time.Millisecond
	}

	for i, expected := range expectedResults {
		// Assert that the next backoff falls in the expected range.
		var minInterval = expected - time.Duration(testRandomizationFactor*float64(expected))
		var maxInterval = expected + time.Duration(testRandomizationFactor*float64(expected))
		if i < 3 || i == 8 {
			time.Sleep(2 * time.Second)
		}
		var actualInterval = exp.NextBackOff()
		if !(minInterval <= actualInterval && actualInterval <= maxInterval) {
			t.Error("error")
		}
		// assertEquals(t, expected, exp.currentInterval)
	}
}


text:
package org.optaplanner.core.impl.phase.scope;

import java.util.List;
import java.util.Random;

import org.optaplanner.core.api.domain.solution.Solution;
import org.optaplanner.core.api.score.Score;
import org.optaplanner.core.config.solver.EnvironmentMode;
import org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor;
import org.optaplanner.core.impl.heuristic.move.Move;
import org.optaplanner.core.impl.score.definition.ScoreDefinition;
import org.optaplanner.core.impl.score.director.InnerScoreDirector;
import org.optaplanner.core.impl.solver.scope.DefaultSolverScope;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class AbstractPhaseScope {

    protected final transient Logger logger = LoggerFactory.getLogger(getClass());

    protected final DefaultSolverScope solverScope;

    protected long startingSystemTimeMillis;

    protected Score startingScore;

    protected int bestSolutionStepIndex;

    public AbstractPhaseScope(DefaultSolverScope solverScope) {
        this.solverScope = solverScope;
    }

    public DefaultSolverScope getSolverScope() {
        return solverScope;
    }

    public long getStartingSystemTimeMillis() {
        return startingSystemTimeMillis;
    }

    public Score getStartingScore() {
        return startingScore;
    }

    public int getBestSolutionStepIndex() {
        return bestSolutionStepIndex;
    }

    public void setBestSolutionStepIndex(int bestSolutionStepIndex) {
        this.bestSolutionStepIndex = bestSolutionStepIndex;
    }

    public abstract AbstractStepScope getLastCompletedStepScope();

    // ************************************************************************
    // Calculated methods
    // ************************************************************************

    public void reset() {
        startingSystemTimeMillis = System.currentTimeMillis();
        bestSolutionStepIndex = -1;
        // TODO Usage of solverScope.getBestScore() would be better performance wise but is null with a uninitialized score
        startingScore = solverScope.calculateScore();
        if (getLastCompletedStepScope().getStepIndex() < 0) {
            getLastCompletedStepScope().setScore(startingScore);
        }
    }

    public SolutionDescriptor getSolutionDescriptor() {
        return solverScope.getSolutionDescriptor();
    }

    public ScoreDefinition getScoreDefinition() {
        return solverScope.getScoreDefinition();
    }

    public long calculateSolverTimeMillisSpent() {
        return solverScope.calculateTimeMillisSpent();
    }

    public long calculatePhaseTimeMillisSpent() {
        long now = System.currentTimeMillis();
        return now - startingSystemTimeMillis;
    }

    public InnerScoreDirector getScoreDirector() {
        return solverScope.getScoreDirector();
    }

    public Solution getWorkingSolution() {
        return solverScope.getWorkingSolution();
    }

    public int getWorkingEntityCount() {
        return solverScope.getWorkingEntityCount();
    }

    public List<Object> getWorkingEntityList() {
        return solverScope.getWorkingEntityList();
    }

    public int getWorkingValueCount() {
        return solverScope.getWorkingValueCount();
    }

    public Score calculateScore() {
        return solverScope.calculateScore();
    }

    public void assertExpectedWorkingScore(Score expectedWorkingScore, Object completedAction) {
        solverScope.assertExpectedWorkingScore(expectedWorkingScore, completedAction);
    }

    public void assertWorkingScoreFromScratch(Score workingScore, Object completedAction) {
        solverScope.assertWorkingScoreFromScratch(workingScore, completedAction);
    }

    public void assertExpectedUndoMoveScore(Move move, Move undoMove) {
        Score undoScore = calculateScore();
        Score lastCompletedStepScore = getLastCompletedStepScope().getScore();
        if (!undoScore.equals(lastCompletedStepScore)) {
            // First assert that are probably no corrupted score rules.
            getScoreDirector().assertWorkingScoreFromScratch(undoScore, undoMove);
            throw new IllegalStateException(
                    "The moveClass (" + move.getClass() + ")'s move (" + move
                            + ") probably has a corrupted undoMove (" + undoMove + ")." +
                            " Or maybe there are corrupted score rules.\n"
                            + "Check the Move.createUndoMove(...) method of that Move class" +
                            " and enable EnvironmentMode " + EnvironmentMode.FULL_ASSERT
                            + " to fail-faster on corrupted score rules.\n"
                            + "Score corruption: the lastCompletedStepScore (" + lastCompletedStepScore
                            + ") is not the undoScore (" + undoScore + ").");
        }
    }

    public Random getWorkingRandom() {
        return solverScope.getWorkingRandom();
    }

    public boolean isBestSolutionInitialized() {
        return solverScope.isBestSolutionInitialized();
    }

    public Score getBestScore() {
        return solverScope.getBestScore();
    }

    public String getBestScoreWithUninitializedPrefix() {
        return solverScope.getBestScoreWithUninitializedPrefix();
    }

    public long getPhaseBestSolutionTimeMillis() {
        long bestSolutionTimeMillis = solverScope.getBestSolutionTimeMillis();
        // If the termination is explicitly phase configured, previous phases must not affect it
        if (bestSolutionTimeMillis < startingSystemTimeMillis) {
            bestSolutionTimeMillis = startingSystemTimeMillis;
        }
        return bestSolutionTimeMillis;
    }

    public int getNextStepIndex() {
        return getLastCompletedStepScope().getStepIndex() + 1;
    }

    @Override
    public String toString() {
        return getClass().getSimpleName(); // TODO add + "(" + phaseIndex + ")"
    }

}


text:
package com.google.schemaorg.core;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
import com.google.schemaorg.SchemaOrgType;
import com.google.schemaorg.SchemaOrgTypeImpl;
import com.google.schemaorg.ValueType;
import com.google.schemaorg.core.datatype.DateTime;
import com.google.schemaorg.core.datatype.Text;
import com.google.schemaorg.core.datatype.URL;
import com.google.schemaorg.goog.GoogConstants;
import com.google.schemaorg.goog.PopularityScoreSpecification;

/** Implementation of {@link BusTrip}. */
public class BusTripImpl extends IntangibleImpl implements BusTrip {
  private static final ImmutableSet<String> PROPERTY_SET = initializePropertySet();

  private static ImmutableSet<String> initializePropertySet() {
    ImmutableSet.Builder<String> builder = ImmutableSet.builder();

    builder.add(CoreConstants.PROPERTY_ADDITIONAL_TYPE);

    builder.add(CoreConstants.PROPERTY_ALTERNATE_NAME);

    builder.add(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP);

    builder.add(CoreConstants.PROPERTY_ARRIVAL_TIME);

    builder.add(CoreConstants.PROPERTY_BUS_NAME);

    builder.add(CoreConstants.PROPERTY_BUS_NUMBER);

    builder.add(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP);

    builder.add(CoreConstants.PROPERTY_DEPARTURE_TIME);

    builder.add(CoreConstants.PROPERTY_DESCRIPTION);

    builder.add(CoreConstants.PROPERTY_IMAGE);

    builder.add(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE);

    builder.add(CoreConstants.PROPERTY_NAME);

    builder.add(CoreConstants.PROPERTY_POTENTIAL_ACTION);

    builder.add(CoreConstants.PROPERTY_PROVIDER);

    builder.add(CoreConstants.PROPERTY_SAME_AS);

    builder.add(CoreConstants.PROPERTY_URL);

    builder.add(GoogConstants.PROPERTY_DETAILED_DESCRIPTION);

    builder.add(GoogConstants.PROPERTY_POPULARITY_SCORE);

    return builder.build();
  }

  static final class BuilderImpl extends SchemaOrgTypeImpl.BuilderImpl<BusTrip.Builder>
      implements BusTrip.Builder {

    @Override
    public BusTrip.Builder addAdditionalType(URL value) {
      return addProperty(CoreConstants.PROPERTY_ADDITIONAL_TYPE, value);
    }

    @Override
    public BusTrip.Builder addAdditionalType(String value) {
      return addProperty(CoreConstants.PROPERTY_ADDITIONAL_TYPE, Text.of(value));
    }

    @Override
    public BusTrip.Builder addAlternateName(Text value) {
      return addProperty(CoreConstants.PROPERTY_ALTERNATE_NAME, value);
    }

    @Override
    public BusTrip.Builder addAlternateName(String value) {
      return addProperty(CoreConstants.PROPERTY_ALTERNATE_NAME, Text.of(value));
    }

    @Override
    public BusTrip.Builder addArrivalBusStop(BusStation value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP, value);
    }

    @Override
    public BusTrip.Builder addArrivalBusStop(BusStation.Builder value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP, value.build());
    }

    @Override
    public BusTrip.Builder addArrivalBusStop(BusStop value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP, value);
    }

    @Override
    public BusTrip.Builder addArrivalBusStop(BusStop.Builder value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP, value.build());
    }

    @Override
    public BusTrip.Builder addArrivalBusStop(String value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP, Text.of(value));
    }

    @Override
    public BusTrip.Builder addArrivalTime(DateTime value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_TIME, value);
    }

    @Override
    public BusTrip.Builder addArrivalTime(String value) {
      return addProperty(CoreConstants.PROPERTY_ARRIVAL_TIME, Text.of(value));
    }

    @Override
    public BusTrip.Builder addBusName(Text value) {
      return addProperty(CoreConstants.PROPERTY_BUS_NAME, value);
    }

    @Override
    public BusTrip.Builder addBusName(String value) {
      return addProperty(CoreConstants.PROPERTY_BUS_NAME, Text.of(value));
    }

    @Override
    public BusTrip.Builder addBusNumber(Text value) {
      return addProperty(CoreConstants.PROPERTY_BUS_NUMBER, value);
    }

    @Override
    public BusTrip.Builder addBusNumber(String value) {
      return addProperty(CoreConstants.PROPERTY_BUS_NUMBER, Text.of(value));
    }

    @Override
    public BusTrip.Builder addDepartureBusStop(BusStation value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP, value);
    }

    @Override
    public BusTrip.Builder addDepartureBusStop(BusStation.Builder value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP, value.build());
    }

    @Override
    public BusTrip.Builder addDepartureBusStop(BusStop value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP, value);
    }

    @Override
    public BusTrip.Builder addDepartureBusStop(BusStop.Builder value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP, value.build());
    }

    @Override
    public BusTrip.Builder addDepartureBusStop(String value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP, Text.of(value));
    }

    @Override
    public BusTrip.Builder addDepartureTime(DateTime value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_TIME, value);
    }

    @Override
    public BusTrip.Builder addDepartureTime(String value) {
      return addProperty(CoreConstants.PROPERTY_DEPARTURE_TIME, Text.of(value));
    }

    @Override
    public BusTrip.Builder addDescription(Text value) {
      return addProperty(CoreConstants.PROPERTY_DESCRIPTION, value);
    }

    @Override
    public BusTrip.Builder addDescription(String value) {
      return addProperty(CoreConstants.PROPERTY_DESCRIPTION, Text.of(value));
    }

    @Override
    public BusTrip.Builder addImage(ImageObject value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, value);
    }

    @Override
    public BusTrip.Builder addImage(ImageObject.Builder value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, value.build());
    }

    @Override
    public BusTrip.Builder addImage(URL value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, value);
    }

    @Override
    public BusTrip.Builder addImage(String value) {
      return addProperty(CoreConstants.PROPERTY_IMAGE, Text.of(value));
    }

    @Override
    public BusTrip.Builder addMainEntityOfPage(CreativeWork value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, value);
    }

    @Override
    public BusTrip.Builder addMainEntityOfPage(CreativeWork.Builder value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, value.build());
    }

    @Override
    public BusTrip.Builder addMainEntityOfPage(URL value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, value);
    }

    @Override
    public BusTrip.Builder addMainEntityOfPage(String value) {
      return addProperty(CoreConstants.PROPERTY_MAIN_ENTITY_OF_PAGE, Text.of(value));
    }

    @Override
    public BusTrip.Builder addName(Text value) {
      return addProperty(CoreConstants.PROPERTY_NAME, value);
    }

    @Override
    public BusTrip.Builder addName(String value) {
      return addProperty(CoreConstants.PROPERTY_NAME, Text.of(value));
    }

    @Override
    public BusTrip.Builder addPotentialAction(Action value) {
      return addProperty(CoreConstants.PROPERTY_POTENTIAL_ACTION, value);
    }

    @Override
    public BusTrip.Builder addPotentialAction(Action.Builder value) {
      return addProperty(CoreConstants.PROPERTY_POTENTIAL_ACTION, value.build());
    }

    @Override
    public BusTrip.Builder addPotentialAction(String value) {
      return addProperty(CoreConstants.PROPERTY_POTENTIAL_ACTION, Text.of(value));
    }

    @Override
    public BusTrip.Builder addProvider(Organization value) {
      return addProperty(CoreConstants.PROPERTY_PROVIDER, value);
    }

    @Override
    public BusTrip.Builder addProvider(Organization.Builder value) {
      return addProperty(CoreConstants.PROPERTY_PROVIDER, value.build());
    }

    @Override
    public BusTrip.Builder addProvider(Person value) {
      return addProperty(CoreConstants.PROPERTY_PROVIDER, value);
    }

    @Override
    public BusTrip.Builder addProvider(Person.Builder value) {
      return addProperty(CoreConstants.PROPERTY_PROVIDER, value.build());
    }

    @Override
    public BusTrip.Builder addProvider(String value) {
      return addProperty(CoreConstants.PROPERTY_PROVIDER, Text.of(value));
    }

    @Override
    public BusTrip.Builder addSameAs(URL value) {
      return addProperty(CoreConstants.PROPERTY_SAME_AS, value);
    }

    @Override
    public BusTrip.Builder addSameAs(String value) {
      return addProperty(CoreConstants.PROPERTY_SAME_AS, Text.of(value));
    }

    @Override
    public BusTrip.Builder addUrl(URL value) {
      return addProperty(CoreConstants.PROPERTY_URL, value);
    }

    @Override
    public BusTrip.Builder addUrl(String value) {
      return addProperty(CoreConstants.PROPERTY_URL, Text.of(value));
    }

    @Override
    public BusTrip.Builder addDetailedDescription(Article value) {
      return addProperty(GoogConstants.PROPERTY_DETAILED_DESCRIPTION, value);
    }

    @Override
    public BusTrip.Builder addDetailedDescription(Article.Builder value) {
      return addProperty(GoogConstants.PROPERTY_DETAILED_DESCRIPTION, value.build());
    }

    @Override
    public BusTrip.Builder addDetailedDescription(String value) {
      return addProperty(GoogConstants.PROPERTY_DETAILED_DESCRIPTION, Text.of(value));
    }

    @Override
    public BusTrip.Builder addPopularityScore(PopularityScoreSpecification value) {
      return addProperty(GoogConstants.PROPERTY_POPULARITY_SCORE, value);
    }

    @Override
    public BusTrip.Builder addPopularityScore(PopularityScoreSpecification.Builder value) {
      return addProperty(GoogConstants.PROPERTY_POPULARITY_SCORE, value.build());
    }

    @Override
    public BusTrip.Builder addPopularityScore(String value) {
      return addProperty(GoogConstants.PROPERTY_POPULARITY_SCORE, Text.of(value));
    }

    @Override
    public BusTrip build() {
      return new BusTripImpl(properties, reverseMap);
    }
  }

  public BusTripImpl(Multimap<String, ValueType> properties, Multimap<String, Thing> reverseMap) {
    super(properties, reverseMap);
  }

  @Override
  public String getFullTypeName() {
    return CoreConstants.TYPE_BUS_TRIP;
  }

  @Override
  public boolean includesProperty(String property) {
    return PROPERTY_SET.contains(CoreConstants.NAMESPACE + property)
        || PROPERTY_SET.contains(GoogConstants.NAMESPACE + property)
        || PROPERTY_SET.contains(property);
  }

  @Override
  public ImmutableList<SchemaOrgType> getArrivalBusStopList() {
    return getProperty(CoreConstants.PROPERTY_ARRIVAL_BUS_STOP);
  }

  @Override
  public ImmutableList<SchemaOrgType> getArrivalTimeList() {
    return getProperty(CoreConstants.PROPERTY_ARRIVAL_TIME);
  }

  @Override
  public ImmutableList<SchemaOrgType> getBusNameList() {
    return getProperty(CoreConstants.PROPERTY_BUS_NAME);
  }

  @Override
  public ImmutableList<SchemaOrgType> getBusNumberList() {
    return getProperty(CoreConstants.PROPERTY_BUS_NUMBER);
  }

  @Override
  public ImmutableList<SchemaOrgType> getDepartureBusStopList() {
    return getProperty(CoreConstants.PROPERTY_DEPARTURE_BUS_STOP);
  }

  @Override
  public ImmutableList<SchemaOrgType> getDepartureTimeList() {
    return getProperty(CoreConstants.PROPERTY_DEPARTURE_TIME);
  }

  @Override
  public ImmutableList<SchemaOrgType> getProviderList() {
    return getProperty(CoreConstants.PROPERTY_PROVIDER);
  }
}


text:
package in.zapr.druid.druidry.extractionFunctions;

import in.zapr.druid.druidry.filter.searchQuerySpec.SearchQuerySpec;
import lombok.Builder;
import lombok.Getter;
import lombok.NonNull;

@Getter
public class SearchQueryExtractionFunction extends ExtractionFunction {

    private SearchQuerySpec query;

    @Builder
    private SearchQueryExtractionFunction(@NonNull SearchQuerySpec query) {
        this.type = SEARCH_QUERY_TYPE;
        this.query = query;
    }
}


text:
typedef struct {
  byte data [248];
  word seqnum;
  long timestamp;
  word crc;
} FlashPage;

// structure of consecutive entries in the data area of each FlashPage
typedef struct {
  byte length;
  byte offset;
  byte header;
  byte data[RF12_MAXDATA];
} FlashEntry;

static FlashPage dfBuf;     // for data not yet written to flash
static word dfLastPage;     // page number last written
static byte dfFill;         // next byte available in buffer to store entries

static byte df_present () {
  return dfLastPage != 0;
}

static void df_enable () {
  // digitalWrite(ENABLE_PIN, 0);
  bitClear(PORTB, 0);
}

static void df_disable () {
  // digitalWrite(ENABLE_PIN, 1);
  bitSet(PORTB, 0);
}

static byte df_xfer (byte cmd) {
  SPDR = cmd;
  while (!bitRead(SPSR, SPIF))
    ;
  return SPDR;
}

void df_command (byte cmd) {
  for (;;) {
    cli();
    df_enable();
    df_xfer(0x05); // Read Status Register
    byte status = df_xfer(0);
    df_disable();
    sei();
    // don't wait for ready bit if there is clearly no dataflash connected
    if (status == 0xFF || (status & 1) == 0)
      break;
  }

  cli();
  df_enable();
  df_xfer(cmd);
}

static void df_deselect () {
  df_disable();
  sei();
}

static void df_writeCmd (byte cmd) {
  df_command(0x06); // Write Enable
  df_deselect();
  df_command(cmd);
}

void df_read (word block, word off, void* buf, word len) {
  df_command(0x03); // Read Array (Low Frequency)
  df_xfer(block >> 8);
  df_xfer(block);
  df_xfer(off);
  for (word i = 0; i < len; ++i)
    ((byte*) buf)[(byte) i] = df_xfer(0);
  df_deselect();
}

void df_write (word block, const void* buf) {
  df_writeCmd(0x02); // Byte/Page Program
  df_xfer(block >> 8);
  df_xfer(block);
  df_xfer(0);
  for (word i = 0; i < 256; ++i)
    df_xfer(((const byte*) buf)[(byte) i]);
  df_deselect();
}

// wait for current command to complete
void df_flush () {
  df_read(0, 0, 0, 0);
}

static void df_wipe () {
  showString(PSTR("DF W\n"));

  df_writeCmd(0xC7); // Chip Erase
  df_deselect();
  df_flush();
}

static void df_erase (word block) {
  showString(PSTR("DF E "));
  Serial.println(block);

  df_writeCmd(DF_PAGE_ERASE); // Block Erase
  df_xfer(block >> 8);
  df_xfer(block);
  df_xfer(0);
  df_deselect();
  df_flush();
}

static word df_wrap (word page) {
  return page < DF_LOG_LIMIT ? page : DF_LOG_BEGIN;
}

static void df_saveBuf () {
  if (dfFill == 0)
    return;

  dfLastPage = df_wrap(dfLastPage + 1);
  if (dfLastPage == DF_LOG_BEGIN)
    ++dfBuf.seqnum; // bump to next seqnum when wrapping

  // set remainder of buffer data to 0xFF and calculate crc over entire buffer
  dfBuf.crc = ~0;
  for (byte i = 0; i < sizeof dfBuf - 2; ++i) {
    if (dfFill <= i && i < sizeof dfBuf.data)
      dfBuf.data[i] = 0xFF;
    dfBuf.crc = _crc16_update(dfBuf.crc, dfBuf.data[i]);
  }

  df_write(dfLastPage, &dfBuf);
  dfFill = 0;

  // wait for write to finish before reporting page, seqnum, and time stamp
  df_flush();
  showString(PSTR("DF S "));
  Serial.print(dfLastPage);
  Serial.print(' ');
  Serial.print(dfBuf.seqnum);
  Serial.print(' ');
  Serial.println(dfBuf.timestamp);

  // erase next block if we just saved data into a fresh block
  // at this point in time dfBuf is empty, so a lengthy erase cycle is ok
  if (dfLastPage % DF_BLOCK_SIZE == 0)
    df_erase(df_wrap(dfLastPage + DF_BLOCK_SIZE));
}

static void df_append (const void* buf, byte len) {
  //FIXME the current logic can't append incoming packets during a save!

  // fill in page time stamp when appending to a fresh page
  if (dfFill == 0)
    dfBuf.timestamp = now();

  long offset = now() - dfBuf.timestamp;
  if (offset >= 255 || dfFill + 1 + len > sizeof dfBuf.data) {
    df_saveBuf();

    dfBuf.timestamp = now();
    offset = 0;
  }

  // append new entry to flash buffer
  dfBuf.data[dfFill++] = offset;
  memcpy(dfBuf.data + dfFill, buf, len);
  dfFill += len;
}

// go through entire log buffer to figure out which page was last saved
static void scanForLastSave () {
  dfBuf.seqnum = 0;
  dfLastPage = DF_LOG_LIMIT - 1;
  // look for last page before an empty page
  for (word page = DF_LOG_BEGIN; page < DF_LOG_LIMIT; ++page) {
    word currseq;
    df_read(page, sizeof dfBuf.data, &currseq, sizeof currseq);
    if (currseq != 0xFFFF) {
      dfLastPage = page;
      dfBuf.seqnum = currseq + 1;
    } else if (dfLastPage == page - 1)
      break; // careful with empty-filled-empty case, i.e. after wrap
  }
}

static void df_initialize () {
  // assumes SPI has already been initialized for the RFM12B
  df_disable();
  pinMode(DF_ENABLE_PIN, OUTPUT);
  df_command(0x9F); // Read Manufacturer and Device ID
  word info = df_xfer(0) << 8;
  info |= df_xfer(0);
  df_deselect();

  if (info == DF_DEVICE_ID) {
    df_writeCmd(0x01);  // Write Status Register ...
    df_xfer(0);         // ... Global Unprotect
    df_deselect();

    scanForLastSave();

    showString(PSTR("DF I "));
    Serial.print(dfLastPage);
    Serial.print(' ');
    Serial.println(dfBuf.seqnum);

    // df_wipe();
    df_saveBuf(); //XXX
  }
}

static void discardInput () {
  while (Serial.read() >= 0)
    ;
}

static void df_dump () {
  struct {
    word seqnum;
    long timestamp;
    word crc;
  } curr;
  discardInput();
  for (word page = DF_LOG_BEGIN; page < DF_LOG_LIMIT; ++page) {
    if (Serial.read() >= 0)
      break;
    // read marker from page in flash
    df_read(page, sizeof dfBuf.data, &curr, sizeof curr);
    if (curr.seqnum == 0xFFFF)
      continue; // page never written to
    showString(PSTR(" df# "));
    Serial.print(page);
    showString(PSTR(" : "));
    Serial.print(curr.seqnum);
    Serial.print(' ');
    Serial.print(curr.timestamp);
    Serial.print(' ');
    Serial.println(curr.crc);
  }
}

static word scanForMarker (word seqnum, long asof) {
  word lastPage = 0;
  struct {
    word seqnum;
    long timestamp;
  } last, curr;
  last.seqnum = 0xFFFF;
  // go through all the pages in log area of flash
  for (word page = DF_LOG_BEGIN; page < DF_LOG_LIMIT; ++page) {
    // read seqnum and timestamp from page in flash
    df_read(page, sizeof dfBuf.data, &curr, sizeof curr);
    if (curr.seqnum == 0xFFFF)
      continue; // page never written to
    if (curr.seqnum >= seqnum && curr.seqnum < last.seqnum) {
      last = curr;
      lastPage = page;
    }
    if (curr.seqnum == last.seqnum && curr.timestamp <= asof)
      lastPage = page;
  }
  return lastPage;
}

static void df_replay (word seqnum, long asof) {
  word page = scanForMarker(seqnum, asof);
  showString(PSTR("r: page "));
  Serial.print(page);
  Serial.print(' ');
  Serial.println(dfLastPage);
  discardInput();
  word savedSeqnum = dfBuf.seqnum;
  while (page != dfLastPage) {
    if (Serial.read() >= 0)
      break;
    page = df_wrap(page + 1);
    df_read(page, 0, &dfBuf, sizeof dfBuf); // overwrites ram buffer!
    if (dfBuf.seqnum == 0xFFFF)
      continue; // page never written to
    // skip and report bad pages
    word crc = ~0;
    for (word i = 0; i < sizeof dfBuf; ++i)
      crc = _crc16_update(crc, dfBuf.data[i]);
    if (crc != 0) {
      showString(PSTR("DF C? "));
      Serial.print(page);
      Serial.print(' ');
      Serial.println(crc);
      continue;
    }
    // report each entry as "R seqnum time <data...>"
    byte i = 0;
    while (i < sizeof dfBuf.data && dfBuf.data[i] < 255) {
      if (Serial.available())
        break;
      showString(PSTR("R "));
      Serial.print(dfBuf.seqnum);
      Serial.print(' ');
      Serial.print(dfBuf.timestamp + dfBuf.data[i++]);
      Serial.print(' ');
      Serial.print((int) dfBuf.data[i++]);
      byte n = dfBuf.data[i++];
      while (n-- > 0) {
        Serial.print(' ');
        Serial.print((int) dfBuf.data[i++]);
      }
      Serial.println();
    }
    // at end of each page, report a "DF R" marker, to allow re-starting
    showString(PSTR("DF R "));
    Serial.print(page);
    Serial.print(' ');
    Serial.print(dfBuf.seqnum);
    Serial.print(' ');
    Serial.println(dfBuf.timestamp);
  }
  dfFill = 0; // ram buffer is no longer valid
  dfBuf.seqnum = savedSeqnum + 1; // so next replay will start at a new value
  showString(PSTR("DF E "));
  Serial.print(dfLastPage);
  Serial.print(' ');
  Serial.print(dfBuf.seqnum);
  Serial.print(' ');
  Serial.println(millis());
}


text:
namespace media {

int DeviceVideoCaptureMaxBufferPoolSize() {
  // The maximum number of video frame buffers in-flight at any one time.
  // If all buffers are still in use by consumers when new frames are produced
  // those frames get dropped.
  static int max_buffer_count = kVideoCaptureDefaultMaxBufferPoolSize;

#if defined(OS_MAC)
  // On macOS, we allow a few more buffers as it's routinely observed that it
  // runs out of three when just displaying 60 FPS media in a video element.
  max_buffer_count = 10;
#elif BUILDFLAG(IS_CHROMEOS_ASH)
  // On Chrome OS with MIPI cameras running on HAL v3, there can be four
  // concurrent streams of camera pipeline depth ~6. We allow at most 36 buffers
  // here to take into account the delay caused by the consumer (e.g. display or
  // video encoder).
  if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) {
    max_buffer_count = 36;
  }
#elif defined(OS_WIN)
  // On Windows, for GMB backed zero-copy more buffers are needed because it's
  // routinely observed that it runs out of default buffer count when just
  // displaying 60 FPS media in a video element
  if (switches::IsVideoCaptureUseGpuMemoryBufferEnabled()) {
    max_buffer_count = 30;
  }
#endif

  return max_buffer_count;
}

}  // namespace media


text:
@interface FlexCollectionViewCell : UICollectionViewCell
@property (strong, nonatomic) UILabel *titleLabel;

@end


text:
module OpenTSDB
  module Errors
    class UnableToConnectError < StandardError
      def to_s
        'Unable to connect or invalid connection data'
      end
    end
  end
end


text:
/* $NoKeywords: $ */
/*
//
// Copyright (c) 1993-2011 Robert McNeel & Associates. All rights reserved.
// OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
// McNeel & Associates.
//
// THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
// ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
// MERCHANTABILITY ARE HEREBY DISCLAIMED.
//
// For complete openNURBS copyright information see <http://www.opennurbs.org>.
//
////////////////////////////////////////////////////////////////
*/

////////////////////////////////////////////////////////////////
//
//   defines ON_TextureMapping
//
////////////////////////////////////////////////////////////////

#if !defined(OPENNURBS_TEXTURE_MAPPING_INC_)
#define OPENNURBS_TEXTURE_MAPPING_INC_

///////////////////////////////////////////////////////////////////////////////
//
// Class ON_TextureMapping
//
class ON_Line;
class ON_BrepFace;
class ON_3dPoint;

typedef int  ( *TEXMAP_INTERSECT_LINE_SURFACE )( const ON_Line*, const ON_BrepFace*, ON_SimpleArray<ON_X_EVENT>& );
typedef bool ( *TEXMAP_BREP_FACE_CLOSEST_POINT )( const ON_BrepFace*, const ON_3dPoint*, ON_3dPoint& );

class ON_CLASS ON_TextureMapping : public ON_Object
{
public:
	ON_OBJECT_DECLARE(ON_TextureMapping);

	ON_TextureMapping();
	~ON_TextureMapping();

	// The copy constructor and operator= overrides are needed
  // to ensure m_geometry is properly copied.
	ON_TextureMapping(const ON_TextureMapping& src);
	ON_TextureMapping& operator=(const ON_TextureMapping& src);

  // overrides virtual ON_Object::IsValid
  ON_BOOL32 IsValid( ON_TextLog* text_log = NULL ) const;

  // overrides virtual ON_Object::Dump
  void Dump( ON_TextLog& ) const;

  // overrides virtual ON_Object::SizeOf
  unsigned int SizeOf() const;

  // overrides virtual ON_Object::Write
  ON_BOOL32 Write(
         ON_BinaryArchive& binary_archive
       ) const;

  // overrides virtual ON_Object::Read
  ON_BOOL32 Read(
         ON_BinaryArchive& binary_archive
       );

  void Default();

  virtual
  ON_UUID ModelObjectId() const;

	/*
	Determines whether the mapping, as currently set up, requires vertex normals to be present on the
	mesh in order to evaluate the mapping correctly.
		*/
	bool RequiresVertexNormals() const;
	bool IsPeriodic(void) const;

  /*
  Description:
	  Create a mapping that will convert surface parameters into
    normalized (0,1)x(0,1) texture coordinates.
	*/
	bool SetSurfaceParameterMapping(void);

  /*
  Description:
    Create a planar projection texture mapping.
  Parameters:
    plane - [in]
    dx - [in]  portion of the plane's x axis that is mapped to [0,1]
               (can be a decreasing interval)
    dy - [in]  portion of the plane's x axis that is mapped to [0,1]
               (can be a decreasing interval)
    dz - [in]  portion of the plane's x axis that is mapped to [0,1]
               (can be a decreasing interval)
    projection_method - [in]
        1: Closest point mapping.
          A target point P is mapped to the point on the plane
          that is closest to P.  The target normal is ignored.
        2: Target line mapping.  A target point-vector pair
          (P, N), are mapped to the point on the plane
          where the line through P, parallel to N, intersects
          the plane.  If the line is parallel to the plane,
          the closest point mapping is used.
  Example:
    Create a mapping that maps the world axis aligned rectangle in
    the world yz plane with corners at (0,3,5) and (0,7,19) to the
    texture coordinate unit square.

          ON_3dVector plane_xaxis(0.0,1.0,0.0);
          ON_3dVector plane_yaxis(0.0,0,0,1.0);
          ON_3dPoint plane_origin(0.0,2.0,4.0);
          ON_Plane plane(plane_origin,plane_xaxis,plane_yaxis);
          ON_Interval dx( 0.0, 7.0 - 3.0);
          ON_Interval dy( 0.0, 19.0 - 5.0);
          ON_Interval dz( 0.0, 1.0 );
          ON_TextureMapping mapping;
          mapping.CreatePlaneMapping(plane,dx,dy,dz);

  Returns:
    True if input is valid.
  */
  bool SetPlaneMapping(
            const ON_Plane& plane,
            const ON_Interval& dx,
            const ON_Interval& dy,
            const ON_Interval& dz
            );

  /*
  Description:
    Create a cylindrical projection texture mapping.
  Parameters:
    cylinder - [in]
        cylinder in world space used to define a cylindrical
        coordinate system.  The angular parameter maps (0,2pi)
        to texture "u" (0,1), The height parameter maps
        (height[0],height[1]) to texture "v" (0,1), and
        the radial parameter maps (0,r) to texture "w" (0,1).
    bIsCapped - [in]
        If true, the cylinder is treated as a finite
        capped cylinder.
  Returns:
    True if input is valid.
  Remarks:
    When the cylinder is capped and m_texture_space = divided,
    the cylinder is mapped to texture space as follows:
      The side is mapped to 0 <= "u" <= 2/3.
      The bottom is mapped to 2/3 <= "u" <= 5/6.
      The top is mapped to 5/6 <= "u" <= 5/6.
    This is the same convention box mapping uses.
  */
	bool SetCylinderMapping(
		 const ON_Cylinder& cylinder,
		 bool bIsCapped
	);

  /*
  Description:
    Create a spherical projection texture mapping.
  Parameters:
    sphere - [in]
        sphere in world space used to define a spherical
        coordinate system. The longitude parameter maps
        (0,2pi) to texture "u" (0,1).  The latitude paramter
        maps (-pi/2,+pi/2) to texture "v" (0,1).
        The radial parameter maps (0,r) to texture "w" (0,1).
  Returns:
    True if input is valid.
  */
	bool SetSphereMapping(
		 const ON_Sphere& sphere
	);

  /*
  Description:
    Create a box projection texture mapping.
  Parameters:
    plane - [in]
        The sides of the box the box are parallel to the
        plane's coordinate planes.  The dx, dy, dz intervals
        determine the location of the sides.
    dx - [in]
       Determines the location of the front and back planes.
       The vector plane.xaxis is perpendicular to these planes
       and they pass through plane.PointAt(dx[0],0,0) and
       plane.PointAt(dx[1],0,0), respectivly.
    dy - [in]
       Determines the location of the left and right planes.
       The vector plane.yaxis is perpendicular to these planes
       and they pass through plane.PointAt(0,dy[0],0) and
       plane.PointAt(0,dy[1],0), respectivly.
    dz - [in]
       Determines the location of the top and bottom planes.
       The vector plane.zaxis is perpendicular to these planes
       and they pass through plane.PointAt(0,0,dz[0]) and
       plane.PointAt(0,0,dz[1]), respectivly.
    bIsCapped - [in]
        If true, the box is treated as a finite
        capped box.
  Returns:
    True if input is valid.
  Remarks:
    When m_texture_space = divided, the box is mapped to texture
    space as follows:

    If the box is not capped, then each side maps to 1/4 of the texture map.

          v=1+---------+---------+---------+---------+
             | x=dx[1] | y=dy[1] | x=dx[0] | y=dy[0] |
             | Front   | Right   | Back    | Left    |
             | --y->   | <-x--   | <-y--   | --x->   |
          v=0+---------+---------+---------+---------+
            0/4 <=u<= 1/4 <=u<= 2/4 <=u<= 3/4 <=u<= 4/4

    If the box is capped, then each side and cap gets 1/6 of the texture map.

          v=1+---------+---------+---------+---------+---------+---------+
             | x=dx[1] | y=dy[1] | x=dx[0] | y=dy[0] | z=dx[1] | z=dz[0] |
             | Front   | Right   | Back    | Left    | Top     |  Bottom |
             | --y->   | <-x--   | <-y--   | --x->   | --x->   | --x->   |
          v=0+---------+---------+---------+---------+---------+---------+
            0/6 <=u<= 1/6 <=u<= 2/6 <=u<= 3/6 <=u<= 4/6 <=u<= 5/6 <=u<= 6/6
  */
	bool SetBoxMapping(
		 const ON_Plane& plane,
		 ON_Interval dx,
		 ON_Interval dy,
		 ON_Interval dz,
     bool bIsCapped
	);

	/*
  Description:
    Get plane mapping parameters from this texture mapping.
  Parameters:
    plane - [out]
    dx - [out]
      Portion of the plane's x axis that is mapped to [0,1]
    dy - [out]
      Portion of the plane's y axis that is mapped to [0,1]
    dz - [out]
      Portion of the plane's z axis that is mapped to [0,1]
  Returns:
	  True if valid plane mapping parameters were returned.
  Remarks:
    NOTE WELL:
      Generally, GetMappingPlane will not return the same
      parameters passed to SetPlaneMapping.  However, the
      location of the plane will be the same.
	*/
	bool GetMappingPlane(
		 ON_Plane& plane,
		 ON_Interval& dx,
		 ON_Interval& dy,
		 ON_Interval& dz
	   ) const;

	/*
  Description:
	  Get a cylindrical projection parameters from this texture mapping.
	Parameters:
	  cylinder - [out]
  Returns:
	  True if a valid cylinder is returned.
  Remarks:
    Generally, GetMappingCylinder will not return the same
    parameters passed to SetCylinderMapping.  However, the
    location of the cylinder will be the same.
    If this mapping is not cylindrical, the cylinder will
    approximate the actual mapping primitive.
	*/
	bool GetMappingCylinder(
		 ON_Cylinder& cylinder
	) const;

	/*
  Description:
	  Get a spherical projection parameters from this texture mapping.
	Parameters:
	  sphere - [out]
  Returns:
	  True if a valid sphere is returned.
  Remarks:
    Generally, GetMappingShere will not return the same
    parameters passed to SetSphereMapping.  However, the
    location of the sphere will be the same.
    If this mapping is not cylindrical, the cylinder will
    approximate the actual mapping primitive.
	*/
	bool GetMappingSphere(
		 ON_Sphere& sphere
	) const;

	/*
	Get a box projection from the texture mapping.
	Parameters:
	plane - [out]
		The center of the box is at plane.origin and the sides
		of the box are parallel to the plane's coordinate planes.
	dx - [out]
	   The "front" and "back" sides of the box are in spanned
	   by the vectors plane.yaxis and plane.zaxis.  The back
	   plane contains the point plane.PointAt(dx[0],0,0) and
	   the front plane contains the point plane.PointAt(dx[1],0,0).
	dy - [out]
	   The "left" and "right" sides of the box are in spanned
	   by the vectors plane.zaxis and plane.xaxis.  The left
	   plane contains the point plane.PointAt(0,dx[0],0) and
	   the back plane contains the point plane.PointAt(0,dy[1],0).
	dz - [out]
	   The "top" and "bottom" sides of the box are in spanned
	   by the vectors plane.xaxis and plane.yaxis.  The bottom
	   plane contains the point plane.PointAt(0,0,dz[0]) and
	   the top plane contains the point plane.PointAt(0,0,dz[1]).
  Returns:
	  True if a valid box is returned.
  Remarks:
    Generally, GetMappingBox will not return the same
    parameters passed to SetBoxMapping.  However, the
    location of the box will be the same.
	*/
	bool GetMappingBox(
		 ON_Plane& plane,
		 ON_Interval& dx,
		 ON_Interval& dy,
		 ON_Interval& dz
	) const;

  /*
  Description:
    Reverses the texture in the specified direction.
  Parameters:
    dir - [in] 0 = reverse "u", 1 = reverse "v", 2 = reverse "w".
  Remarks:
    Modies m_uvw so that the spedified direction transforms
    the texture coordinate t to 1-t.
  Returns:
    True if input is valid.
  */
  bool ReverseTextureCoordinate( int dir );

  /*
  Description:
    Swaps the specified texture coordinates.
  Parameters:
    i - [in]
    j - [in]
  Remarks:
    Modifies m_uvw so that the specified texture coordinates are swapped.
  Returns:
    True if input is valid.
  */
  bool SwapTextureCoordinate( int i, int j );

  /*
  Description:
    Tiles the specified texture coordinates.
  Parameters:
    dir - [in] 0 =  "u", 1 = "v", 2 = "w".
    count - [in] number of tiles
    offset - [in] offset of the tile
  Remarks:
    Modies m_uvw so that the specified texture coordinate is
    tiled.
  Returns:
    True if input is valid.
  */
  bool TileTextureCoordinate( int dir, double count, double offset );

  /*
  Description:
    Evaluate the mapping to get a texture coordinate.
  Parameters:
    P - [in] Vertex location
    N - [in] If the mapping projection is ray_projection,
             then this is the vertex unit normal.  Otherwise
             N is ignored.
    T - [out] Texture coordinate (u,v,w)

    P_xform -[in]
      Transformation to be applied to P before performing
      the mapping calculation.
    N_xform - [in]
      Transformation to be applied to N before performing
      the mapping calculation.  One way to calculate N_xform
      is to use the call P_xform::GetVectorTransform(N_xform).

  Returns:
    Nonzero if evaluation is successful.  When the mapping
    is a box or capped cylinder mapping, the value indicates
    which side was evaluated.

      Cylinder mapping:
        1 = cylinder wall, 2 = bottom cap, 3 = top cap
      Box mapping:
        1 = front
        2 = right
        3 = back
        4 = left
        5 = bottom
        6 = top

  See Also:
    ON_TextureMapping::GetTextureCoordinates
    ON_Mesh::SetTextureCoordinates
  */
  virtual
  int Evaluate(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    ON_3dPoint* T
    ) const;

  virtual
  int Evaluate(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    ON_3dPoint* T,
	  const ON_Xform& P_xform,
    const ON_Xform& N_xform
    ) const;

  int EvaluatePlaneMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    ON_3dPoint* T
    ) const;

  int EvaluateSphereMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    ON_3dPoint* T
    ) const;

  int EvaluateCylinderMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    ON_3dPoint* T
    ) const;

  int EvaluateBoxMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    ON_3dPoint* T
    ) const;

  int EvaluateMeshMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    const ON_Mesh* mesh,
    ON_3dPoint* T
    ) const;

  int EvaluateSurfaceMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    const ON_Surface* srf,
    ON_3dPoint* T
    ) const;

  int EvaluateBrepMapping(
    const ON_3dPoint& P,
    const ON_3dVector& N,
    const ON_Brep* brep,
    ON_3dPoint* T
    ) const;

  static void SetAdvancedBrepMappingToolFunctions(TEXMAP_INTERSECT_LINE_SURFACE, TEXMAP_BREP_FACE_CLOSEST_POINT);

  /*
  Description:
    Quickly check to see if a mesh or tag has texture coordinates
    set by this mapping.
  Parameters:
    mesh - [in]
    tag - [in]
    object_xform - [in] (optional)
      If this transform is not NULL, then true will be
      returned only if the mapping function is the same and
      the tag's m_mesh_xform field is the same as mesh_xform.
      This parameter is typically NULL or the value of
      ON_MappingRef::m_object_xform.
  Returns:
    True if the meshes texture coordinates were set by this
    mapping.
  */
  bool HasMatchingTextureCoordinates(
         const ON_Mesh& mesh,
         const ON_Xform* object_xform = 0
         ) const;
  bool HasMatchingTextureCoordinates(
         const class ON_MappingTag& tag,
         const ON_Xform* object_xform = 0
         ) const;

  /*
  Description:
    Get texture coordinates.  This calculation is
    expensive.  When possible, use a MappingMatch()
    query to avoid unnecessary calculations.
  Parameters:
    mesh - [in]
    T - [out] Texture coordinates returned here.
    mesh_xform - [in] (optional)
      If the mesh has been transformed since the texture mapping was set
      up, pass the transformation here.  Typically this is the value
      of ON_Mesh::m_mapping_xform or ON_MappingRef::m_object_xform
    bLazy - [in]
      If true and the mesh.m_T[] values were calculated using
      this mapping, they are simply copied to the T[] array
      and no calculations are performed.  If you are calling
      the 3d point version and you care about the z-coordinate,
      then do not use the lazy option (meshes only store
      2d texture coordinates).
    Tside - [out]
      In the case of divided textures, side information is returned
      here if a lazy mapping is not done.  Otherwise Tside->Count()
      will be zero.
      Cylinder mapping:
        1 = cylinder wall, 2 = bottom cap, 3 = top cap
      Box mapping:
        1 = front
        2 = right
        3 = back
        4 = left
        5 = bottom
        6 = top
  Example:

          ON_TextureMapping mapping = ...;
          const ON_Mesh* mesh = ...;
          bool bLazy = true;
          ON_SimpleArray<ON_3dPoint> T(mesh->VertexCount());
          T.SetCount(mesh->m_VertexCount());
          if ( !mapping.GetTextureCoordinates(mesh,3,3,&T[0].x,bLazy) )
            T.SetCount(0).

  Returns:
    True if successful.
  */
  bool GetTextureCoordinates(
    const ON_Mesh& mesh,
    ON_SimpleArray<ON_3fPoint>& T,
		const ON_Xform* mesh_xform = 0,
    bool bLazy = false,
    ON_SimpleArray<int>* Tside = 0
    ) const;

  bool GetTextureCoordinates(
    const ON_Mesh& mesh,
    ON_SimpleArray<ON_2fPoint>& T,
		const ON_Xform* mesh_xform = 0,
    bool bLazy = false,
    ON_SimpleArray<int>* Tside = 0
    ) const;

public:
  // The only reliable and persistent way to reference texture
  // mappings is by the mapping_id.  If the mapping id is
  // set to m_srfp_mapping_id, then all other mapping settings
  // are ignored.
  ON_UUID m_mapping_id;

  // Runtime texture mapping table index.
  // This value is NOT SAVED IN 3DM FILES.
  // This value is constant for each runtime instance of Rhino,
  // but can change each time a model is loaded or saved.
  // Once a texture mapping is in the CRhinoDoc material table,
  // its id and index never change in that instance of Rhino.
  int m_mapping_index;

  // The texture mapping name is for UI and user comfort.
  // Duplicates are permitted.
  ON_wString m_mapping_name;

  //////////////////////////////////////////////////////////
  //
  // Mapping types:
  //
  //   You can either calculate texture coordinates based on
  //   the parameterization of the surface used to create a mesh,
  //   or project the natural parameterization from a mapping
  //   primitive, like a plane, sphere, box, or cylinder.
  //
	// Do not change TYPE enum values - they are saved in 3dm files.
  //
  enum TYPE
  {
    no_mapping       = 0,

    srfp_mapping     = 1, // u,v = linear transform of surface params,w = 0
    plane_mapping    = 2, // u,v,w = 3d coordinates wrt frame
    cylinder_mapping = 3, // u,v,w = logitude, height, radius
    sphere_mapping   = 4, // (u,v,w) = longitude,latitude,radius
    box_mapping      = 5,
    mesh_mapping_primitive = 6, // m_mapping_primitive is an ON_Mesh
    srf_mapping_primitive  = 7, // m_mapping_primitive is an ON_Surface
    brep_mapping_primitive = 8, // m_mapping_primitive is an ON_Brep

    force_32bit_mapping_type = 0xFFFFFFFF
  };

	TYPE m_type;

  //////////////////////////////////////////////////////////
  //
  // Projection:
  //
  //   When a mapping primitive, like a plane, sphere, box,
  //   or cylinder, is used, there are two projection options.
  //
  //  clspt_projection: world xyz maps to the point on the
  //                    mapping primitive that is closest to xyz.
  //                    In this case, ON_TextureMapping::Evaluate
  //                    ignores the vector argument.
  //
  //  ray_projection:   world xyz + world vector defines a world line.
  //                    The world line is intersected with the mapping
  //                    primitive and the intersection point that is
  //                    closest to the world xyz point is used to
  //                    calculate the mapping parameters.
  //
  //  The value of m_projection can be changed as needed.
  //
  //  If m_type = srfp_mapping, then m_projection is ignored.
  //
  enum PROJECTION
  {
    no_projection    = 0,
    clspt_projection = 1,
    ray_projection   = 2,
    force_32bit_mapping_projection = 0xFFFFFFFF
  };

  PROJECTION m_projection;

  //////////////////////////////////////////////////////////
  //
  // Texture space
  //
  //   When a mapping primitive is a box or a capped cylinder,
  //   there are two options for the mapping.  Either the sides
  //   all map to (0,1)x(0,1) (so the either texture map appears
  //   on each side, or the sides map to distinct regions of the
  //   texture space.
  //
  enum TEXTURE_SPACE
  {
    single  = 0, // sides and caps map to same texture space
    divided = 1, // sides and caps map to distinct vertical
                 // regions of texture space.
                 // (0, 1/4, 2/4, 3/4, 1) for uncapped boxes.
                 // (0, 1/6, 2/6, 3/6, 4/6, 5/6, 1) for capped boxes.
                 // (0, 4/6, 5/6, 1) for capped cylinders.
    force_32bit_texture_space = 0xFFFFFFFF
  };

  TEXTURE_SPACE m_texture_space;

  // The m_bCapped applies to cylinder and box mappings.  If
  // m_bCapped is false, the cylinder or box is "infinite".
  // If m_bCapped is true, they are finite.
  bool m_bCapped;

  //////////////////////////////////////////////////////////
  //
  // For primitive based mappings, these transformations are
  // used to map the world coordinate (x,y,z) point P and
  // surface normal N before it is projected to the normalized
  // mapping primitive. The surface normal transformation,
  // m_Nxyz, is always calculated from m_Pxyz.  It is a
  // runtime setting that is not saved in 3dm files.
  // If m_type is srfp_mapping, then m_Pxyz and m_Nxyz are
  // ignored.
  ON_Xform m_Pxyz;
  ON_Xform m_Nxyz;

  // Transform applied to mapping coordinate (u,v,w) to
  // convert it into a texture coordinate.
  ON_Xform m_uvw;

  // Custom mapping primitive.
  ON_Object* m_mapping_primitive;

  static TYPE TypeFromInt( int i );
  static PROJECTION ProjectionFromInt( int i );
  static TEXTURE_SPACE TextureSpaceFromInt( int i);

  ON__UINT32 MappingCRC() const;
};

#if defined(ON_DLL_TEMPLATE)
// This stuff is here because of a limitation in the way Microsoft
// handles templates and DLLs.  See Microsoft's knowledge base
// article ID Q168958 for details.
#pragma warning( push )
#pragma warning( disable : 4231 )
ON_DLL_TEMPLATE template class ON_CLASS ON_ClassArray<ON_TextureMapping>;
ON_DLL_TEMPLATE template class ON_CLASS ON_ObjectArray<ON_TextureMapping>;
#pragma warning( pop )
#endif

#endif


text:
@interface DKCategoryCell ()
@property (nonatomic,strong) UILabel *titleLabel;
@property (nonatomic,strong) UILabel *subTitleLabel;
@end

@implementation DKCategoryCell

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor purpleColor];

        self.titleLabel = [[UILabel alloc]init];
        self.subTitleLabel = [[UILabel alloc]init];

        [UIView dk_addSubviews:@[self.titleLabel,self.subTitleLabel] onView:self.contentView];

        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.font = [UIFont fontWithName:kFontRegular size:18];

        self.subTitleLabel.textAlignment = NSTextAlignmentCenter;
        self.subTitleLabel.font = [UIFont fontWithName:kFontRegular size:12];

    }
    return self;
}

- (void)setTitle:(NSString *)title {
    // layout
    CGRect frame;
    CGFloat inset = 5;
    frame.origin = CGPointMake(inset,[DKDevice categoriesCellInset]);
    frame.size.width = self.bounds.size.width -2*inset;
    frame.size.height = 22;
    self.titleLabel.frame = frame;

    frame.origin.y = self.titleLabel.dk_bottom;
    self.subTitleLabel.frame = frame;

    // set values
    self.titleLabel.text = title;

    NSString *subtitle = [NSString stringWithFormat:@"%@ %@", @(self.numberOfStories),
                          (self.numberOfStories==1)?@"story":@"stories"];
    self.subTitleLabel.text = subtitle;

    self.backgroundColor = [UIColor bc_colorForBrand:title];

    if ([[UIColor bc_brandsWithLightColor] containsObject:title]) {
        self.titleLabel.textColor = [UIColor blackColor];
        self.subTitleLabel.textColor = [UIColor blackColor];
    }
    else {
        self.titleLabel.textColor = [UIColor whiteColor];
        self.subTitleLabel.textColor = [UIColor whiteColor];
        }
}

@end


text:
<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer' . '/autoload_real.php';

return ComposerAutoloaderInitb8a8207bd8a609a2d73a2e0fe9e769bd::getLoader();


text:
<TITLE>XML::DOM - A perl module for building DOM Level 1 compliant document structures</TITLE>
NAME

XML::DOM - A perl module for building DOM Level 1 compliant document structures

SYNOPSIS

 use XML::DOM;

 my $parser = new XML::DOM::Parser;
 my $doc = $parser->parsefile ("file.xml");

 # print all HREF attributes of all CODEBASE elements
 my $nodes = $doc->getElementsByTagName ("CODEBASE");
 my $n = $nodes->getLength;

 for (my $i = 0; $i < $n; $i++)
 {
     my $node = $nodes->item ($i);
     my $href = $node->getAttributeNode ("HREF");
     print $href->getValue . "\n";
 }

 # Print doc file
 $doc->printToFile ("out.xml");

 # Print to string
 print $doc->toString;

 # Avoid memory leaks - cleanup circular references for garbage collection
 $doc->dispose;

DESCRIPTION

This module extends the XML::Parser module by Clark Cooper.
The XML::Parser module is built on top of XML::Parser::Expat,
which is a lower level interface to James Clark's expat library.

XML::DOM::Parser is derived from XML::Parser. It parses XML strings or files
and builds a data structure that conforms to the API of the Document Object
Model as described at http://www.w3.org/TR/REC-DOM-Level-1.
See the XML::Parser manpage for other available features of the
XML::DOM::Parser class.
Note that the 'Style' property should not be used (it is set internally.)

The XML::Parser NoExpand option is more or less supported, in that it will
generate EntityReference objects whenever an entity reference is encountered
in character data. I'm not sure how useful this is. Any comments are welcome.

As described in the synopsis, when you create an XML::DOM::Parser object,
the parse and parsefile methods create an XML::DOM::Document object
from the specified input. This Document object can then be examined, modified and
written back out to a file or converted to a string.

When using XML::DOM with XML::Parser version 2.19 and up, setting the
XML::DOM::Parser option KeepCDATA to 1 will store CDATASections in
CDATASection nodes, instead of converting them to Text nodes.
Subsequent CDATASection nodes will be merged into one. Let me know if this
is a problem.

When using XML::Parser 2.27 and above, you can suppress expansion of
parameter entity references (e.g. %pent;) in the DTD, by setting ParseParamEnt
to 1 and ExpandParamEnt to 0. See Hidden Nodes for details.

A Document has a tree structure consisting of Node objects. A Node may contain
other nodes, depending on its type.
A Document may have Element, Text, Comment, and CDATASection nodes.
Element nodes may have Attr, Element, Text, Comment, and CDATASection nodes.
The other nodes may not have any child nodes.

This module adds several node types that are not part of the DOM spec (yet.)
These are: ElementDecl (for <!ELEMENT ...> declarations), AttlistDecl (for
<!ATTLIST ...> declarations), XMLDecl (for <?xml ...?> declarations) and AttDef
(for attribute definitions in an AttlistDecl.)

XML::DOM Classes

The XML::DOM module stores XML documents in a tree structure with a root node
of type XML::DOM::Document. Different nodes in tree represent different
parts of the XML file. The DOM Level 1 Specification defines the following
node types:

XML::DOM::Node - Super class of all node types

XML::DOM::Document - The root of the XML document

XML::DOM::DocumentType - Describes the document structure: <!DOCTYPE root [ ... ]>

XML::DOM::Element - An XML element: <elem attr="val"> ... </elem>

XML::DOM::Attr - An XML element attribute: name="value"

XML::DOM::CharacterData - Super class of Text, Comment and CDATASection

XML::DOM::Text - Text in an XML element

XML::DOM::CDATASection - Escaped block of text: <![CDATA[ text ]]>

XML::DOM::Comment - An XML comment: <!-- comment -->

XML::DOM::EntityReference - Refers to an ENTITY: &ent; or %ent;

XML::DOM::Entity - An ENTITY definition: <!ENTITY ...>

XML::DOM::ProcessingInstruction - <?PI target>

XML::DOM::DocumentFragment - Lightweight node for cut & paste

XML::DOM::Notation - An NOTATION definition: <!NOTATION ...>

In addition, the XML::DOM module contains the following nodes that are not part
of the DOM Level 1 Specification:

XML::DOM::ElementDecl - Defines an element: <!ELEMENT ...>

XML::DOM::AttlistDecl - Defines one or more attributes in an <!ATTLIST ...>

XML::DOM::AttDef - Defines one attribute in an <!ATTLIST ...>

XML::DOM::XMLDecl - An XML declaration: <?xml version="1.0" ...>

Other classes that are part of the DOM Level 1 Spec:

XML::DOM::Implementation - Provides information about this implementation. Currently it doesn't do much.

XML::DOM::NodeList - Used internally to store a node's child nodes. Also returned by getElementsByTagName.

XML::DOM::NamedNodeMap - Used internally to store an element's attributes.

Other classes that are not part of the DOM Level 1 Spec:

XML::DOM::Parser - An non-validating XML parser that creates XML::DOM::Documents

XML::DOM::ValParser - A validating XML parser that creates XML::DOM::Documents. It uses XML::Checker to check against the DocumentType (DTD)

XML::Handler::BuildDOM - A PerlSAX handler that creates XML::DOM::Documents.

XML::DOM package

Constant definitions

The following predefined constants indicate which type of node it is.

 UNKNOWN_NODE (0)                The node type is unknown (not part of DOM)

 ELEMENT_NODE (1)                The node is an Element.
 ATTRIBUTE_NODE (2)              The node is an Attr.
 TEXT_NODE (3)                   The node is a Text node.
 CDATA_SECTION_NODE (4)          The node is a CDATASection.
 ENTITY_REFERENCE_NODE (5)       The node is an EntityReference.
 ENTITY_NODE (6)                 The node is an Entity.
 PROCESSING_INSTRUCTION_NODE (7) The node is a ProcessingInstruction.
 COMMENT_NODE (8)                The node is a Comment.
 DOCUMENT_NODE (9)               The node is a Document.
 DOCUMENT_TYPE_NODE (10)         The node is a DocumentType.
 DOCUMENT_FRAGMENT_NODE (11)     The node is a DocumentFragment.
 NOTATION_NODE (12)              The node is a Notation.

 ELEMENT_DECL_NODE (13)		 The node is an ElementDecl (not part of DOM)
 ATT_DEF_NODE (14)		 The node is an AttDef (not part of DOM)
 XML_DECL_NODE (15)		 The node is an XMLDecl (not part of DOM)
 ATTLIST_DECL_NODE (16)		 The node is an AttlistDecl (not part of DOM)

 Usage:

   if ($node->getNodeType == ELEMENT_NODE)
   {
       print "It's an Element";
   }

Not In DOM Spec: The DOM Spec does not mention UNKNOWN_NODE and,
quite frankly, you should never encounter it. The last 4 node types were added
to support the 4 added node classes.

Global Variables

$VERSION

The variable $XML::DOM::VERSION contains the version number of this
implementation, e.g. "1.07".

METHODS

These methods are not part of the DOM Level 1 Specification.

getIgnoreReadOnly and ignoreReadOnly (readOnly)

The DOM Level 1 Spec does not allow you to edit certain sections of the document,
e.g. the DocumentType, so by default this implementation throws DOMExceptions
(i.e. NO_MODIFICATION_ALLOWED_ERR) when you try to edit a readonly node.
These readonly checks can be disabled by (temporarily) setting the global
IgnoreReadOnly flag.

The ignoreReadOnly method sets the global IgnoreReadOnly flag and returns its
previous value. The getIgnoreReadOnly method simply returns its current value.

 my $oldIgnore = XML::DOM::ignoreReadOnly (1);
 eval {
 ... do whatever you want, catching any other exceptions ...
 };
 XML::DOM::ignoreReadOnly ($oldIgnore);     # restore previous value

Another way to do it, using a local variable:

 { # start new scope
    local $XML::DOM::IgnoreReadOnly = 1;
    ... do whatever you want, don't worry about exceptions ...
 } # end of scope ($IgnoreReadOnly is set back to its previous value)

isValidName (name)

Whether the specified name is a valid "Name" as specified in the XML spec.
Characters with Unicode values > 127 are now also supported.

getAllowReservedNames and allowReservedNames (boolean)

The first method returns whether reserved names are allowed.
The second takes a boolean argument and sets whether reserved names are allowed.
The initial value is 1 (i.e. allow reserved names.)

The XML spec states that "Names" starting with (X|x)(M|m)(L|l)
are reserved for future use. (Amusingly enough, the XML version of the XML spec
(REC-xml-19980210.xml) breaks that very rule by defining an ENTITY with the name
'xmlpio'.)
A "Name" in this context means the Name token as found in the BNF rules in the
XML spec.

XML::DOM only checks for errors when you modify the DOM tree, not when the
DOM tree is built by the XML::DOM::Parser.

setTagCompression (funcref)

There are 3 possible styles for printing empty Element tags:

Style 0

 <empty/> or <empty attr="val"/>

XML::DOM uses this style by default for all Elements.

Style 1

  <empty></empty> or <empty attr="val"></empty>

Style 2

  <empty /> or <empty attr="val" />

This style is sometimes desired when using XHTML.
(Note the extra space before the slash "/")
See http://www.w3.org/TR/xhtml1 Appendix C for more details.

By default XML::DOM compresses all empty Element tags (style 0.)
You can control which style is used for a particular Element by calling
XML::DOM::setTagCompression with a reference to a function that takes
2 arguments. The first is the tag name of the Element, the second is the
XML::DOM::Element that is being printed.
The function should return 0, 1 or 2 to indicate which style should be used to
print the empty tag. E.g.

 XML::DOM::setTagCompression (\&my_tag_compression);

 sub my_tag_compression
 {
    my ($tag, $elem) = @_;

    # Print empty br, hr and img tags like this: <br />
    return 2 if $tag =~ /^(br|hr|img)$/;

    # Print other empty tags like this: <empty></empty>
    return 1;
 }

IMPLEMENTATION DETAILS

* Perl Mappings

The value undef was used when the DOM Spec said null.

The DOM Spec says: Applications must encode DOMString using UTF-16 (defined in
Appendix C.3 of [UNICODE] and Amendment 1 of [ISO-10646]).
In this implementation we use plain old Perl strings encoded in UTF-8 instead of
UTF-16.

* Text and CDATASection nodes

The Expat parser expands EntityReferences and CDataSection sections to
raw strings and does not indicate where it was found.
This implementation does therefore convert both to Text nodes at parse time.
CDATASection and EntityReference nodes that are added to an existing Document
(by the user) will be preserved.

Also, subsequent Text nodes are always merged at parse time. Text nodes that are
added later can be merged with the normalize method. Consider using the addText
method when adding Text nodes.

* Printing and toString

When printing (and converting an XML Document to a string) the strings have to
encoded differently depending on where they occur. E.g. in a CDATASection all
substrings are allowed except for "]]>". In regular text, certain characters are
not allowed, e.g. ">" has to be converted to "&gt;".
These routines should be verified by someone who knows the details.

* Quotes

Certain sections in XML are quoted, like attribute values in an Element.
XML::Parser strips these quotes and the print methods in this implementation
always uses double quotes, so when parsing and printing a document, single quotes
may be converted to double quotes. The default value of an attribute definition
(AttDef) in an AttlistDecl, however, will maintain its quotes.

* AttlistDecl

Attribute declarations for a certain Element are always merged into a single
AttlistDecl object.

* Comments

Comments in the DOCTYPE section are not kept in the right place. They will become
child nodes of the Document.

* Hidden Nodes

Previous versions of XML::DOM would expand parameter entity references
(like %pent;), so when printing the DTD, it would print the contents
of the external entity, instead of the parameter entity reference.
With this release (1.27), you can prevent this by setting the XML::DOM::Parser
options ParseParamEnt => 1 and ExpandParamEnt => 0.

When it is parsing the contents of the external entities, it *DOES* still add
the nodes to the DocumentType, but it marks these nodes by setting
the 'Hidden' property. In addition, it adds an EntityReference node to the
DocumentType node.

When printing the DocumentType node (or when using to_expat() or to_sax()),
the 'Hidden' nodes are suppressed, so you will see the parameter entity
reference instead of the contents of the external entities. See test case
t/dom_extent.t for an example.

The reason for adding the 'Hidden' nodes to the DocumentType node, is that
the nodes may contain <!ENTITY> definitions that are referenced further
in the document. (Simply not adding the nodes to the DocumentType could
cause such entity references to be expanded incorrectly.)

Note that you need XML::Parser 2.27 or higher for this to work correctly.

SEE ALSO

The Japanese version of this document by Takanori Kawai (Hippo2000)
at http://member.nifty.ne.jp/hippo2000/perltips/xml/dom.htm

The DOM Level 1 specification at http://www.w3.org/TR/REC-DOM-Level-1

The XML spec (Extensible Markup Language 1.0) at http://www.w3.org/TR/REC-xml

The XML::Parser and XML::Parser::Expat manual pages.

CAVEATS

The method getElementsByTagName() does not return a "live" NodeList.
Whether this is an actual caveat is debatable, but a few people on the
www-dom mailing list seemed to think so. I haven't decided yet. It's a pain
to implement, it slows things down and the benefits seem marginal.
Let me know what you think.

(To subscribe to the www-dom mailing list send an email with the subject
"subscribe" to www-dom-request@w3.org. I only look here occasionally, so don't
send bug reports or suggestions about XML::DOM to this list, send them
to enno@att.com instead.)

AUTHOR

Send bug reports, hints, tips, suggestions to Enno Derksen at
<enno@att.com>.

Thanks to Clark Cooper for his help with the initial version.

Last updated: Wed Feb 23 13:37:18 2000


text:
const sc = require("supercolliderjs");

function makePyramid(lang) {
  lang.interpret("(1..8).pyramid").then(
    function(result) {
      // result is a native javascript array
      console.log("= " + result);
      lang.quit();
    },
    function(error) {
      // syntax or runtime errors
      // are returned as javascript objects
      console.error(error);
    },
  );
}

// Verbose example to show Promises and full error handling
sc.lang.boot().then(
  // ok booted
  lang => {
    makePyramid(lang);
  },
  // failed to boot
  error => {
    console.error(error);
    // Either:
    // 1. The executable may be missing, incorrect path etc.
    // 2. The class library may have failed with compile errors
  },
);


text: bool GetToken(char** sx, char* e, char* token);


text:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity name="DvdWorld\WebsiteBundle\Entity\Actors" table="Actors">
    <id name="fullname" type="string" column="fullname" length="60">
      <generator strategy="IDENTITY"/>
    </id>
    <many-to-many field="movie" target-entity="Movies" mapped-by="fullname"/>
  </entity>
</doctrine-mapping>