text:
package com.amazonaws.services.groundstation.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Item in a list of satellites.
 *

 *
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SatelliteListItem implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * NORAD satellite ID number.
     *

     */
    private Integer noradSatelliteID;
    /**
     *

     * ARN of a satellite.
     *

     */
    private String satelliteArn;
    /**
     *

     * ID of a satellite.
     *

     */
    private String satelliteId;

    /**
     *

     * NORAD satellite ID number.
     *

     *
     * @param noradSatelliteID
     *        NORAD satellite ID number.
     */

    public void setNoradSatelliteID(Integer noradSatelliteID) {
        this.noradSatelliteID = noradSatelliteID;
    }

    /**
     *

     * NORAD satellite ID number.
     *

     *
     * @return NORAD satellite ID number.
     */

    public Integer getNoradSatelliteID() {
        return this.noradSatelliteID;
    }

    /**
     *

     * NORAD satellite ID number.
     *

     *
     * @param noradSatelliteID
     *        NORAD satellite ID number.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SatelliteListItem withNoradSatelliteID(Integer noradSatelliteID) {
        setNoradSatelliteID(noradSatelliteID);
        return this;
    }

    /**
     *

     * ARN of a satellite.
     *

     *
     * @param satelliteArn
     *        ARN of a satellite.
     */

    public void setSatelliteArn(String satelliteArn) {
        this.satelliteArn = satelliteArn;
    }

    /**
     *

     * ARN of a satellite.
     *

     *
     * @return ARN of a satellite.
     */

    public String getSatelliteArn() {
        return this.satelliteArn;
    }

    /**
     *

     * ARN of a satellite.
     *

     *
     * @param satelliteArn
     *        ARN of a satellite.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SatelliteListItem withSatelliteArn(String satelliteArn) {
        setSatelliteArn(satelliteArn);
        return this;
    }

    /**
     *

     * ID of a satellite.
     *

     *
     * @param satelliteId
     *        ID of a satellite.
     */

    public void setSatelliteId(String satelliteId) {
        this.satelliteId = satelliteId;
    }

    /**
     *

     * ID of a satellite.
     *

     *
     * @return ID of a satellite.
     */

    public String getSatelliteId() {
        return this.satelliteId;
    }

    /**
     *

     * ID of a satellite.
     *

     *
     * @param satelliteId
     *        ID of a satellite.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public SatelliteListItem withSatelliteId(String satelliteId) {
        setSatelliteId(satelliteId);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getNoradSatelliteID() != null)
            sb.append("NoradSatelliteID: ").append(getNoradSatelliteID()).append(",");
        if (getSatelliteArn() != null)
            sb.append("SatelliteArn: ").append(getSatelliteArn()).append(",");
        if (getSatelliteId() != null)
            sb.append("SatelliteId: ").append(getSatelliteId());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof SatelliteListItem == false)
            return false;
        SatelliteListItem other = (SatelliteListItem) obj;
        if (other.getNoradSatelliteID() == null ^ this.getNoradSatelliteID() == null)
            return false;
        if (other.getNoradSatelliteID() != null && other.getNoradSatelliteID().equals(this.getNoradSatelliteID()) == false)
            return false;
        if (other.getSatelliteArn() == null ^ this.getSatelliteArn() == null)
            return false;
        if (other.getSatelliteArn() != null && other.getSatelliteArn().equals(this.getSatelliteArn()) == false)
            return false;
        if (other.getSatelliteId() == null ^ this.getSatelliteId() == null)
            return false;
        if (other.getSatelliteId() != null && other.getSatelliteId().equals(this.getSatelliteId()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getNoradSatelliteID() == null) ? 0 : getNoradSatelliteID().hashCode());
        hashCode = prime * hashCode + ((getSatelliteArn() == null) ? 0 : getSatelliteArn().hashCode());
        hashCode = prime * hashCode + ((getSatelliteId() == null) ? 0 : getSatelliteId().hashCode());
        return hashCode;
    }

    @Override
    public SatelliteListItem clone() {
        try {
            return (SatelliteListItem) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.groundstation.model.transform.SatelliteListItemMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}

redpajama_set_name: RedPajamaGithub


text:
package at.loup.filemanager.repositories.repositories;

import java.util.Set;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import at.loup.filemanager.entities.TagEntity;
import at.loup.filemanager.repositories.repositories.custom.interfaces.TagRepositoryCustom;

@Repository()
public interface TagRepository extends JpaRepository<TagEntity, Long>, TagRepositoryCustom {
	TagEntity findByTag(String tag);

	Set<TagEntity> findByTagIn(String... tags);
}


text:
package org.missionassetfund.apps.android.utils;

public class ArrayUtils {

    /**
     *

     * Reverses the order of the given array.
     *

     *

     * This method does nothing for a {@code null} input array.
     *

     *
     * @param array the array to reverse, may be {@code null}
     */
    public static void reverse(final int[] array) {
        if (array == null) {
            return;
        }
        reverse(array, 0, array.length);
    }

    /**
     *

     * Reverses the order of the given array in the given range.
     *

     *

     * This method does nothing for a {@code null} input array.
     *

     *
     * @param array the array to reverse, may be {@code null}
     * @param startIndexInclusive the starting index. Undervalue (<0) is
     *            promoted to 0, overvalue (>array.length) results in no
     *            change.
     * @param endIndexExclusive elements up to endIndex-1 are reversed in the
     *            array. Undervalue (< start index) results in no change.
     *            Overvalue (>array.length) is demoted to array length.
     * @since 3.2
     */
    public static void reverse(final int[] array, int startIndexInclusive, int endIndexExclusive) {
        if (array == null) {
            return;
        }
        int i = startIndexInclusive < 0 ? 0 : startIndexInclusive;
        int j = Math.min(array.length, endIndexExclusive) - 1;
        int tmp;
        while (j > i) {
            tmp = array[j];
            array[j] = array[i];
            array[i] = tmp;
            j--;
            i++;
        }
    }

}


text:
require 'json'

$version = '0.4'

puts "radiobox-#{$version}"

def mpv_should_be_installed
  puts ''
  puts 'Checking is mpv installed ...'
  result = system('mpv --version')
  if result.nil?
    puts ''
    puts 'Error: You must install mpv player!'
    puts '  * Official website: http://mpv.io'
    puts '  * Windows builds: http://mpv.srsfckn.biz/'
    puts ''
    abort('✖ Mpv not found')
  end
end

mpv_should_be_installed
puts '✔ Success'
puts ''
puts 'Press ENTER to continue main menu ...'
gets

def option_not_implemented_yet(message)
  puts ''
  puts "Sorry! #{message}"
  puts 'Press ENTER to continue ...'
  gets
  show_options
end

def print_menu
  system('clear')
  puts "radiobox-#{$version} \t Command line radio player for coder geeks :)"
  puts ''
  puts 'Choose a menu item to continue:'
  puts '1) Select Radio Station'
  puts '2) Play Random Station'
  puts '3) Search Radio Station'
  puts ''
end

def play_selected_radio(radios, keymap)
  puts ''
  puts '(b) Back to main menu ...'
  puts ''
  print "Select number to play radio (1-#{keymap.length})? "
  selected = gets.chomp.downcase
  return if selected[0] == 'b'

  selected = '1' if selected.length.zero?
  radio = keymap[selected.to_i - 1]
  puts ''
  puts "#{radio} ..."
  mpv = "mpv --no-ytdl #{radios[radio]}"
  puts mpv
  system(mpv)
  puts 'Press ENTER to continue ...'
  gets
end

def select_radio_station
  system('clear')
  puts 'List of Radio Stations'
  puts '----------------------'
  radios = JSON.parse(File.read('radios.json'))
  keymap = []
  radios.each do |key, value|
    if !key.strip.empty? && !value.strip.empty?
      keymap.append(key.strip)
      puts "(#{keymap.length}) #{key}"
    end
  end
  # @todo print in columns
  # https://github.com/tj/terminal-table
  play_selected_radio(radios, keymap)
end

def show_options
  print_menu
  print '1-3 or press q to quit app? '
  selected = gets.chomp.downcase
  case selected
  when '1'
    select_radio_station
    show_options
  when '2'
    option_not_implemented_yet('Play random station feature is not implemented yet.')
  when '3'
    option_not_implemented_yet('Search radio station feature is not implemented yet.')
  when 'q'
    puts 'bye bye'
    exit 0
  else
    show_options
  end
end

show_options


text:
package psymbolic.runtime.machine.buffer;

import psymbolic.runtime.Message;
import psymbolic.valuesummary.Guard;
import psymbolic.valuesummary.ListVS;
import psymbolic.valuesummary.PrimitiveVS;
import psymbolic.valuesummary.ValueSummary;

import java.io.Serializable;
import java.util.function.Function;

/**
 * Implements the Defer Queue used to keep track of the deferred events
 */
public class DeferQueue extends SymbolicQueue<Message> implements Serializable {

    public DeferQueue() {
        super();
    }

    /**
     * Defer a particular event by adding it to the defer queue of the machine
     * @param pc Guard under which to defer the event
     * @param event Event to be deferred
     */
    public void defer(Guard pc, Message event) { enqueue(event.restrict(pc)); }

    public PrimitiveVS<Boolean> satisfiesPredUnderGuard(Function<Message, PrimitiveVS<Boolean>> pred) {
        Guard cond = isEnabledUnderGuard();
        assert(!cond.isFalse());
        Message top = peek(cond);
        return pred.apply(top).restrict(top.getUniverse());
    }

    public ValueSummary getEvents() {
        return this.elements;
    }

    public void setEvents(ValueSummary events) {
        this.elements = (ListVS<Message>) events;
        resetPeek();
    }
}


text:
<?php

namespace Magento\Test\Integrity\Magento\Framework\Search;

class SearchEngineConfigTest extends \Magento\TestFramework\Integrity\AbstractConfig
{
    /** @var \Magento\Framework\Config\Dom\UrnResolver */
    protected $urnResolver;

    protected function setUp()
    {
        $this->urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
    }

    /**
     * Returns the name of the XSD file to be used to validate the XML
     *
     * @return string
     */
    protected function _getXsd()
    {
        return $this->urnResolver->getRealPath('urn:magento:framework:Search/etc/search_engine.xsd');
    }

    /**
     * Returns the name of the XSD file to be used to validate partial XML
     *
     * @return string
     */
    protected function _getFileXsd()
    {
        return $this->urnResolver->getRealPath('urn:magento:framework:Search/etc/search_engine.xsd');
    }

    /**
     * The location of a single valid complete xml file
     *
     * @return string
     */
    protected function _getKnownValidXml()
    {
        return __DIR__ . '/_files/search_engine/valid.xml';
    }

    /**
     * The location of a single known invalid complete xml file
     *
     * @return string
     */
    protected function _getKnownInvalidXml()
    {
        return __DIR__ . '/_files/search_engine/invalid.xml';
    }

    /**
     * The location of a single known valid partial xml file
     *
     * @return string
     */
    protected function _getKnownValidPartialXml()
    {
        return null;
    }

    /**
     * @param null $expectedErrors
     */
    public function testSchemaUsingInvalidXml($expectedErrors = null)
    {
        $expectedErrors = array_filter(
            explode(
                "\n",
                "
Element 'feature': The attribute 'support' is required but missing.
Element 'wrong': This element is not expected. Expected is ( feature ).
Element 'feature': The attribute 'name' is required but missing.
Element 'engine', attribute 'wrong': The attribute 'wrong' is not allowed.
Element 'engine': The attribute 'name' is required but missing.
Element 'feature', attribute 'support': 'wrong' is not a valid value of the atomic type 'xs:boolean'.
"
            )
        );
        parent::testSchemaUsingInvalidXml($expectedErrors);
    }

    /**
     * Returns the name of the xml files to validate
     *
     * @return string
     */
    protected function _getXmlName()
    {
        return 'search_engine.xml';
    }

    /**
     * The location of a single known invalid partial xml file
     *
     * @return string
     */
    protected function _getKnownInvalidPartialXml()
    {
        return null;
    }

    public function testSchemaUsingValidXml()
    {
        parent::testSchemaUsingValidXml();
    }
}


text:
/* eslint-disable */
import React from 'react'
import assert from 'assert'

import { transform } from 'babel-standalone'

import Enzyme from '../Enzyme';
const shallow = Enzyme.shallow;
const mount = Enzyme.mount;
const render = Enzyme.render;

export const QA = true;

// ---------------------------- define challenge title ----------------------------
export const challengeTitle = `<span class = 'default'>Challenge: </span>Extract Local State into Redux`

// ---------------------------- challenge text ----------------------------
export const challengeText = `Intro: You're almost done! Recall that you wrote all the Redux code so that Redux could control the state management of your React messages app. Now that Redux is connected, you need to extract the state management out of the Presentational component and into Redux. Currently, you have Redux connected, but you are handling the state locally within the Presentational component.`

// ---------------------------- challenge instructions ----------------------------
export const challengeInstructions = `Instructions: In the Presentational component, first, remove the messages property in the local state. These messages will be managed by Redux. Next, modify the submitMessage() method so that it dispatches submitNewMessage() from this.props, and pass in the current message input from local state as an argument. Because you removed messages from local state, remove the messages property from the call to this.setState() here as well. Finally, modify the render() method so that it maps over the messages received from props rather than state.

Once these changes are made, the app will continue to function the same, except Redux manages the state. This example also illustrates how a component may have local state: your component still tracks user input locally in its own state. You can see how Redux provides a useful state management framework on top of React. You achieved the same result using only React's local state at first, and this is usually possible with simple apps. However, as your apps become larger and more complex, so does your state management, and this is the problem Redux solves.`

// ---------------------------- define challenge seed code ----------------------------
export const seedCode =
`// Redux:
const ADD = 'ADD';

const addMessage = (message) => {
  return {
    type: ADD,
    message: message
  }
};

const messageReducer = (state = [], action) => {
  switch (action.type) {
    case ADD:
      return [
        ...state,
        action.message
      ];
    default:
      return state;
  }
};

const store = Redux.createStore(messageReducer);

// React:
const Provider = ReactRedux.Provider;
const connect = ReactRedux.connect;

// Change code below this line
class Presentational extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      input: '',
      messages: []
    }
  }
  handleChange = (event) => {
    this.setState({
      input: event.target.value
    });
  }
  submitMessage = () => {
    this.setState({
      input: '',
      messages: this.state.messages.concat(this.state.input)
    });
  }
  render() {
    return (

Type in a new Message:

        <input
          value={this.state.input}
          onChange={this.handleChange}/>

        <button onClick={this.submitMessage}>Submit</button>

          {this.state.messages.map( (message, idx) => {
              return (

{message}

              )
            })
          }

    );
  }
};
// Change code above this line

const mapStateToProps = (state) => {
  return {messages: state}
};

const mapDispatchToProps = (dispatch) => {
  return {
    submitNewMessage: (message) => {
      dispatch(addMessage(message))
    }
  }
};

const Container = connect(mapStateToProps, mapDispatchToProps)(Presentational);

class AppWrapper extends React.Component {
  render() {
    return (
      <Provider store={store}>
        <Container/>
      </Provider>
    );
  }
};`

// ---------------------------- define challenge solution code ----------------------------
export const solutionCode =
`// Redux:
const ADD = 'ADD';

const addMessage = (message) => {
  return {
    type: ADD,
    message: message
  }
};

const messageReducer = (state = [], action) => {
  switch (action.type) {
    case ADD:
      return [
        ...state,
        action.message
      ];
    default:
      return state;
  }
};

const store = Redux.createStore(messageReducer);

// React:
const Provider = ReactRedux.Provider;
const connect = ReactRedux.connect;

// Change code below this line
class Presentational extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      input: ''
    }
  }
  handleChange = (event) => {
    this.setState({
      input: event.target.value
    });
  }
  submitMessage = () => {
    this.props.submitNewMessage(this.state.input);
    this.setState({
      input: ''
    });
  }
  render() {
    return (

Type in a new Message:

        <input
          value={this.state.input}
          onChange={this.handleChange}/>

        <button onClick={this.submitMessage}>Submit</button>

          {this.props.messages.map( (message, idx) => {
              return (

{message}

              )
            })
          }

    );
  }
};
// Change code above this line

const mapStateToProps = (state) => {
  return {messages: state}
};

const mapDispatchToProps = (dispatch) => {
  return {
    submitNewMessage: (message) => {
      dispatch(addMessage(message))
    }
  }
};

const Container = connect(mapStateToProps, mapDispatchToProps)(Presentational);

class AppWrapper extends React.Component {
  render() {
    return (
      <Provider store={store}>
        <Container/>
      </Provider>
    );
  }
};`

// ---------------------------- define challenge tests ----------------------------

export const executeTests = (code, errorSuppression) => {

  const error_0 = 'Your JSX code should transpile successfully.';
  const error_1 = 'The AppWrapper should render to the page.';
  const error_2 = 'The Presentational component should render to the page.';
  const error_3 = 'The Presentational component should render an h2, input, button, and ul elements.';
  const error_4 = 'The Presentational component should receive messages from the Redux store as a prop.';
  const error_5 = 'The Presentational component should receive the submitMessage() action creator as a prop.';
  const error_6 = 'The Presentational component\'s state should contain one property, \'input\', which is initialized to an empty string.';
  const error_7 = 'Typing in the input element should update the state of the Presentational component.';
  const error_8 = 'Dispatching the submitMessage() on the Presentational component should update Redux store and clear the input in local state.';
  const error_9 = 'The Presentational component should render the messages from the Redux store.';

  let testResults = [
    {
      test: 0,
      status: false,
      condition: error_0
    },
    {
      test: 1,
      status: false,
      condition: error_1
    },
    {
      test: 2,
      status: false,
      condition: error_2
    },
    {
      test: 3,
      status: false,
      condition: error_3
    },
    {
      test: 4,
      status: false,
      condition: error_4
    },
    {
      test: 5,
      status: false,
      condition: error_5
    },
    {
      test: 6,
      status: false,
      condition: error_6
    },
    {
      test: 7,
      status: false,
      condition: error_7
    },
    {
      test: 8,
      status: false,
      condition: error_8
    },
    {
      test: 9,
      status: false,
      condition: error_9
    }
  ];

  let es5, mockedComponent, passed = true;

  // this applies an export to the user's code so
  // we can access their component here for tests

  const exportScript = '\n export default AppWrapper;'
  const modifiedCode = code.concat(exportScript);

  // test 0: try to transpile JSX, ES6 code to ES5 in browser
  try {
    es5 = transform(modifiedCode, { presets: [ 'es2015', 'stage-2', 'react' ] }).code;
    testResults[0].status = true;
    if (!errorSuppression) console.log('No transpilation errors!');
  } catch (err) {
    passed = false;
    testResults[0].status = false;
    if (!errorSuppression) console.error(`Transpilation error: ${err}`);
  }

  // now we will try to shallow render the component with Enzyme's shallow method
  // you can also use mount to perform a full render to the DOM environment
  // to do this you must import mount above; i.e. import { shallow, mount } from enzyme
  try {
    var React = require('react');
    var Redux = require('redux');
    var ReactRedux = require('react-redux');
    mockedComponent = mount(React.createElement(eval(es5)));
  } catch (err) {
    passed = false;
    if (!errorSuppression) console.error(`Invalid React code: ${err}`);
  }

  // run specific tests to verify the functionality
  // that the challenge is trying to assess:

  // test 1:
  try {
    assert.strictEqual(mockedComponent.find('AppWrapper').length, 1, error_1);
    testResults[1].status = true;
  } catch (err) {
    passed = false;
    testResults[1].status = false;
  }

  // test 2:
  try {
    assert.strictEqual(mockedComponent.find('Presentational').length, 1, error_2);
    testResults[2].status = true;
  } catch (err) {
    passed = false;
    testResults[2].status = false;
  }

  let PresentationalComponent, props;

  // test 3:
  try {

    PresentationalComponent = mockedComponent.find('Presentational');
    assert(
      PresentationalComponent.find('div').length === 1 &&
      PresentationalComponent.find('h2').length === 1 &&
      PresentationalComponent.find('button').length === 1 &&
      PresentationalComponent.find('ul').length === 1,
      error_3
    );

    testResults[3].status = true;
  } catch (err) {
    passed = false;
    testResults[3].status = false;
  }

  // test 4:
  try {
    props = PresentationalComponent.props();
    assert.strictEqual(Array.isArray(props.messages), true, error_4);
    testResults[4].status = true;
  } catch (err) {
    passed = false;
    testResults[4].status = false;
  }

  // test 5:
  try {
    props = PresentationalComponent.props();
    assert.strictEqual(typeof props.submitNewMessage, 'function', error_5);
    testResults[5].status = true;
  } catch (err) {
    passed = false;
    testResults[5].status = false;
  }

  // test 6:
  try {
    let PresentationalState = mockedComponent.find('Presentational').state('input');
    assert(
        typeof PresentationalState.input === 'string' &&
        Object.keys(PresentationalState).length === 1,
        error_6
    );
    testResults[6].status = true;
  } catch (err) {
    passed = false;
    testResults[6].status = false;
  }

  // test 7:
  try {
    let initialState = mockedComponent.find('Presentational').node.state;
    mockedComponent.find('input').simulate('change', {target: {value: '__MOCK__INPUT__'}});
    let updatedState = mockedComponent.find('Presentational').node.state;
    assert(
      initialState.input === '' &&
      updatedState.input === '__MOCK__INPUT__',
      error_7
    );
    testResults[7].status = true;
  } catch (err) {
    passed = false;
    testResults[7].status = false;
  }

  // test 8:
  try {

    let beforeProps = mockedComponent.find('Presentational').node.props;
    mockedComponent.find('input').simulate('change', {target: {value: '__TEST__MESSAGE__'}});
    mockedComponent.find('Presentational').node.submitMessage();
    let afterProps = mockedComponent.find('Presentational').node.props;
    let afterState = mockedComponent.find('Presentational').node.state;

    assert(
      beforeProps.messages[0] !== afterProps.messages[0] &&
      afterProps.messages[0] === '__TEST__MESSAGE__' &&
      afterState.input === '',
      error_8
    );

    testResults[8].status = true;
  } catch (err) {
    passed = false;
    testResults[8].status = false;
  }

  // test 9:
  try {

    let ulBefore = mockedComponent.find('ul').children();
    mockedComponent.find('input').simulate('change', {target: {value: '__TEST__MESSAGE__2__'}});
    mockedComponent.find('Presentational').node.submitMessage();
    let ulAfter = mockedComponent.find('ul').children();

    assert(
      code.replace(/\s/g,'').includes('this.props.messages.map') === true &&
      ulAfter.length === ulBefore.length + 1 &&
      ulBefore.node.innerText === '__TEST__MESSAGE__' &&
      ulAfter.nodes[1].innerText === '__TEST__MESSAGE__2__',
      error_9
    );

    testResults[9].status = true;
  } catch (err) {
    passed = false;
    testResults[9].status = false;
  }

  return {
    passed,
    testResults
  }

}

// ---------------------------- define live render function ----------------------------

export const liveRender = (code) => {

  try {
    const exportScript = '\n export default AppWrapper;'
    const modifiedCode = code.concat(exportScript);
    const es5 = transform(modifiedCode, { presets: [ 'es2015', 'stage-2', 'react' ] }).code;
    const renderedComponent = React.createElement(eval(es5));
    return renderedComponent;
  } catch (err) {
    // console.log(`Live rendering failure: ${err}`);
  }

}


text:
<?php namespace mfe\core\libs\components;

/**
 * Class CException
 * @package mfe\core\libs\components
 */
class CException extends \Exception
{
}


text:
<!doctype html>
<meta charset="utf-8">

<link rel="author" title="Aleks Totic" href="mailto:atotic@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS2/tables.html#dynamic-effects">

Visibility collapse changes table height even when its height is fixed

      a

      hello

      b


text:
package unomodding.minecraft.tools.impl.bukkit.ban;

import org.bukkit.BanList;
import unomodding.minecraft.tools.ban.BanEntry;
import unomodding.minecraft.tools.ban.BanManager;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

public class BukkitBanManager implements BanManager {
    private final BanList banList;

    public BukkitBanManager(BanList banList) {
        this.banList = banList;
    }

    public BanEntry getEntry(String target) {
        return new BukkitBanEntry(banList.getBanEntry(target));
    }

    public Set<BanEntry> getEntries() {
        Set<BanEntry> banEntries = new HashSet<BanEntry>();
        for(org.bukkit.BanEntry banEntry : banList.getBanEntries()) {
            banEntries.add(new BukkitBanEntry(banEntry));
        }
        return banEntries;
    }

    public BanEntry issueBan(String target, String source, String reason, Date expires) {
        return new BukkitBanEntry(banList.addBan(target, reason, expires, source));
    }

    public boolean isBanned(String target) {
        return banList.isBanned(target);
    }

    public void remove(String target) {
        banList.pardon(target);
    }
}


text:
package org.jboss.hal.testsuite.test.configuration.web.services.endpoint.configuration;

import java.io.IOException;

import org.apache.commons.lang3.RandomStringUtils;
import org.jboss.arquillian.core.api.annotation.Inject;
import org.jboss.arquillian.drone.api.annotation.Drone;
import org.jboss.arquillian.graphene.page.Page;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.hal.resources.Ids;
import org.jboss.hal.testsuite.Console;
import org.jboss.hal.testsuite.CrudOperations;
import org.jboss.hal.testsuite.Random;
import org.jboss.hal.testsuite.creaper.ManagementClientProvider;
import org.jboss.hal.testsuite.fixtures.WebServicesFixtures;
import org.jboss.hal.testsuite.page.configuration.WebServicesPage;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.WebDriver;
import org.wildfly.extras.creaper.core.online.OnlineManagementClient;
import org.wildfly.extras.creaper.core.online.operations.OperationException;
import org.wildfly.extras.creaper.core.online.operations.Operations;
import org.wildfly.extras.creaper.core.online.operations.Values;

@RunWith(Arquillian.class)
public class PostHandlerChainHandlerTest {

    private static final OnlineManagementClient client = ManagementClientProvider.createOnlineManagementClient();

    private static final Operations operations = new Operations(client);

    private static final String END_POINT_CONFIGURATION_EDIT =
        "endpoint-configuration-to-be-edited-" + RandomStringUtils.randomAlphanumeric(7);

    private static final WebServicesFixtures.HandlerChain POST_HANDLER_CHAIN_EDIT =
        new WebServicesFixtures.HandlerChain.Builder(END_POINT_CONFIGURATION_EDIT)
            .handlerChainName("pre-handler-chain-to-be-edited-" + RandomStringUtils.randomAlphanumeric(7))
            .endpointConfiguration()
            .postHandlerChain()
            .build();

    private static final WebServicesFixtures.Handler POST_HANDLER_CHAIN_HANDLER_CREATE =
        new WebServicesFixtures.Handler.Builder(
            "post-handler-chain-handler-to-be-created-" + RandomStringUtils.randomAlphanumeric(7))
            .className(Random.name())
            .handlerChain(POST_HANDLER_CHAIN_EDIT)
            .build();

    private static final WebServicesFixtures.Handler POST_HANDLER_CHAIN_HANDLER_DELETE =
        new WebServicesFixtures.Handler.Builder(
            "post-handler-chain-handler-to-be-removed-" + RandomStringUtils.randomAlphanumeric(7))
            .className(Random.name())
            .handlerChain(POST_HANDLER_CHAIN_EDIT)
            .build();

    private static final WebServicesFixtures.Handler POST_HANDLER_CHAIN_HANDLER_EDIT =
        new WebServicesFixtures.Handler.Builder(
            "post-handler-chain-handler-to-be-edited-" + RandomStringUtils.randomAlphanumeric(7))
            .className(Random.name())
            .handlerChain(POST_HANDLER_CHAIN_EDIT)
            .build();

    @BeforeClass
    public static void setUp() throws IOException {
        operations.add(WebServicesFixtures.endpointConfigurationAddress(END_POINT_CONFIGURATION_EDIT));
        operations.add(POST_HANDLER_CHAIN_EDIT.handlerChainAddress());
        createHandler(POST_HANDLER_CHAIN_HANDLER_DELETE);
        createHandler(POST_HANDLER_CHAIN_HANDLER_EDIT);
    }

    private static void createHandler(WebServicesFixtures.Handler handler) throws IOException {
        operations.add(handler.handlerAddress(), Values.of(WebServicesFixtures.CLASS, handler.getClassName()));
    }

    @AfterClass
    public static void tearDown() throws IOException, OperationException {
        try {
            operations.removeIfExists(WebServicesFixtures.endpointConfigurationAddress(END_POINT_CONFIGURATION_EDIT));
        } finally {
            client.close();
        }
    }

    @Inject
    private Console console;

    @Inject
    private CrudOperations crudOperations;

    @Drone
    private WebDriver browser;

    @Page
    private WebServicesPage page;

    @Before
    public void initPage() {
        page.navigate();
        console.verticalNavigation().selectPrimary(Ids.WEBSERVICES_ENDPOINT_CONFIG_ITEM);
        page.getEndpointConfigurationTable().action(END_POINT_CONFIGURATION_EDIT, "Post");
        page.getEndpointConfigurationHandlerChainTable().action(POST_HANDLER_CHAIN_EDIT.getHandlerChainName(), "Handler");
    }

    @Test
    public void create() throws Exception {
        crudOperations.create(
            POST_HANDLER_CHAIN_HANDLER_CREATE.handlerAddress(),
            page.getEndpointConfigurationHandlerTable(), formFragment -> {
                formFragment.text("name", POST_HANDLER_CHAIN_HANDLER_CREATE.getName());
                formFragment.text(WebServicesFixtures.CLASS, POST_HANDLER_CHAIN_HANDLER_CREATE.getClassName());
            }, resourceVerifier -> {
                resourceVerifier.verifyExists();
                resourceVerifier.verifyAttribute(WebServicesFixtures.CLASS, POST_HANDLER_CHAIN_HANDLER_CREATE.getClassName());
            });
    }

    @Test
    public void remove() throws Exception {
        crudOperations.delete(POST_HANDLER_CHAIN_HANDLER_DELETE.handlerAddress(),
            page.getEndpointConfigurationHandlerTable(), POST_HANDLER_CHAIN_HANDLER_DELETE.getName());
    }

    @Test
    public void editClass() throws Exception {
        page.getEndpointConfigurationHandlerTable().select(POST_HANDLER_CHAIN_HANDLER_EDIT.getName());
        crudOperations.update(POST_HANDLER_CHAIN_HANDLER_EDIT.handlerAddress(),
            page.getEndpointConfigurationHandlerForm(), WebServicesFixtures.CLASS);
    }

}


text:
""" The abstract implementation of all pyface top-level windows. """

# Import the toolkit specific version.
from __future__ import absolute_import

from .toolkit import toolkit_object
Window = toolkit_object('window:Window')

#### EOF ######################################################################


text:
Configuration files for machines

# Installing
In home folder:

```
git clone --no-checkout git@github.com:marcelodeaguiar/lconfig.git
cd lconfig
git config core.worktree "../../"
git reset --hard origin/master

```

# Updating files
In home folder:

```
cd lconfig
git pull
git reset --hard origin/master
```


text:
import {NgtscTestEnvironment} from './env';

describe('ngtsc incremental compilation', () => {
  let env !: NgtscTestEnvironment;
  beforeEach(() => {
    env = NgtscTestEnvironment.setup();
    env.enableMultipleCompilations();
    env.tsconfig();
  });

  it('should compile incrementally', () => {
    env.write('service.ts', `
      import {Injectable} from '@angular/core';

      @Injectable()
      export class Service {}
    `);
    env.write('test.ts', `
      import {Component} from '@angular/core';
      import {Service} from './service';

      @Component({selector: 'cmp', template: 'cmp'})
      export class Cmp {
        constructor(service: Service) {}
      }
    `);
    env.driveMain();
    env.flushWrittenFileTracking();

    // Pretend a change was made to test.ts.
    env.invalidateCachedFile('test.ts');
    env.driveMain();
    const written = env.getFilesWrittenSinceLastFlush();

    // The component should be recompiled, but not the service.
    expect(written).toContain('/test.js');
    expect(written).not.toContain('/service.js');
  });
});


text:
using UnityEngine;
using System.Collections;

public class RPG_Camera : MonoBehaviour {

    public static RPG_Camera instance;

    public Transform cameraPivot;
    public float distance = 5f;
    public float distanceMax = 1000f;
    public float mouseSpeed = 8f;
    public float mouseScroll = 15f;
    public float mouseSmoothingFactor = 0.08f;
    public float camDistanceSpeed = 0.7f;
    public float camBottomDistance = 1f;
    public float firstPersonThreshold = 0.8f;
    public float characterFadeThreshold = 1.8f;

    private Vector3 desiredPosition;
    private float desiredDistance;
    private float lastDistance;
    private float mouseX = 0f;
    private float mouseXSmooth = 0f;
    private float mouseXVel;
    private float mouseY = 0f;
    private float mouseYSmooth = 0f;
    private float mouseYVel;
    private float mouseYMin = -89.5f;
    private float mouseYMax = 89.5f;
    private float distanceVel;
    private bool camBottom;
    private bool constraint;

    private static float halfFieldOfView;
    private static float planeAspect;
    private static float halfPlaneHeight;
    private static float halfPlaneWidth;

    void Awake() {
        instance = this;
    }

    void Start() {
        distance = Mathf.Clamp(distance, 0.05f, distanceMax);
        desiredDistance = distance;

        halfFieldOfView = (Camera.main.fieldOfView / 2) * Mathf.Deg2Rad;
        planeAspect = Camera.main.aspect;
        halfPlaneHeight = Camera.main.nearClipPlane * Mathf.Tan(halfFieldOfView);
        halfPlaneWidth = halfPlaneHeight * planeAspect;

        mouseX = 0f;
        mouseY = 15f;
    }

    public static void CameraSetup() {
        GameObject cameraUsed;
        GameObject cameraPivot;
        RPG_Camera cameraScript;

        if (Camera.main != null)
            cameraUsed = Camera.main.gameObject;
        else {
            cameraUsed = new GameObject("Main Camera");
            cameraUsed.AddComponent<Camera>();
            cameraUsed.tag = "MainCamera";
        }

        if (!cameraUsed.GetComponent("RPG_Camera"))
            cameraUsed.AddComponent<RPG_Camera>();
        cameraScript = cameraUsed.GetComponent("RPG_Camera") as RPG_Camera;

        cameraPivot = GameObject.Find("cameraPivot") as GameObject;
        cameraScript.cameraPivot = cameraPivot.transform;
    }

    void LateUpdate() {
        if (cameraPivot == null) {
            Debug.Log("Error: No cameraPivot found! Please read the manual for further instructions.");
            return;
        }

        GetInput();

        GetDesiredPosition();

        PositionUpdate();

        CharacterFade();
	}

    void GetInput() {

        if (distance > 0.1) { // distance > 0.05 would be too close, so 0.1 is fine
            Debug.DrawLine(transform.position, transform.position - Vector3.up * camBottomDistance, Color.green);
            camBottom = Physics.Linecast(transform.position, transform.position - Vector3.up * camBottomDistance);
        }

        bool constrainMouseY = camBottom && transform.position.y - cameraPivot.transform.position.y <= 0;

        if (Input.GetMouseButton(0) || Input.GetMouseButton(1)) {
            Cursor.visible = false; // if you want the cursor behavior of the version 1.0, change this line to "Screen.lockCursor = true;"

            mouseX += Input.GetAxis("Mouse X") * mouseSpeed;

            if (constrainMouseY) {
                if (Input.GetAxis("Mouse Y") < 0)
                    mouseY -= Input.GetAxis("Mouse Y") * mouseSpeed;
            } else
                mouseY -= Input.GetAxis("Mouse Y") * mouseSpeed;
        } else
            Cursor.visible = true; // if you want the cursor behavior of the version 1.0, change this line to "Screen.lockCursor = false;"

        mouseY = ClampAngle(mouseY, -89.5f, 89.5f);
        mouseXSmooth = Mathf.SmoothDamp(mouseXSmooth, mouseX, ref mouseXVel, mouseSmoothingFactor);
        mouseYSmooth = Mathf.SmoothDamp(mouseYSmooth, mouseY, ref mouseYVel, mouseSmoothingFactor);

        if (constrainMouseY)
            mouseYMin = mouseY;
        else
            mouseYMin = -89.5f;

        mouseYSmooth = ClampAngle(mouseYSmooth, mouseYMin, mouseYMax);

        if (Input.GetMouseButton(1))
            RPG_Controller.instance.transform.rotation = Quaternion.Euler(RPG_Controller.instance.transform.eulerAngles.x, Camera.main.transform.eulerAngles.y, RPG_Controller.instance.transform.eulerAngles.z);

        desiredDistance = desiredDistance - Input.GetAxis("Mouse ScrollWheel") * mouseScroll;

        if (desiredDistance > distanceMax)
            desiredDistance = distanceMax;

        if (desiredDistance < 0.05)
            desiredDistance = 0.05f;
    }

    void GetDesiredPosition() {
        distance = desiredDistance;
        desiredPosition = GetCameraPosition(mouseYSmooth, mouseXSmooth, distance);

        float closestDistance;
        constraint = false;

        closestDistance = CheckCameraClipPlane(cameraPivot.position, desiredPosition);

        if (closestDistance != -1) {
            distance = closestDistance;
            desiredPosition = GetCameraPosition(mouseYSmooth, mouseXSmooth, distance);

            constraint = true;
        }

        distance -= Camera.main.nearClipPlane;

        if (lastDistance < distance || !constraint)
            distance = Mathf.SmoothDamp(lastDistance, distance, ref distanceVel, camDistanceSpeed);

        if (distance < 0.05)
            distance = 0.05f;

        lastDistance = distance;

        desiredPosition = GetCameraPosition(mouseYSmooth, mouseXSmooth, distance); // if the camera view was blocked, then this is the new "forced" position
    }

    void PositionUpdate() {
        transform.position = desiredPosition;

        if (distance > 0.05)
            transform.LookAt(cameraPivot);
    }

    void CharacterFade() {
        if (RPG_Animation.instance == null)
            return;

        if (distance < firstPersonThreshold)
		    RPG_Animation.instance.GetComponent<Renderer>().enabled = false;

	    else if (distance < characterFadeThreshold) {
            RPG_Animation.instance.GetComponent<Renderer>().enabled = true;

            float characterAlpha = 1 - (characterFadeThreshold - distance) / (characterFadeThreshold - firstPersonThreshold);
            if (RPG_Animation.instance.GetComponent<Renderer>().material.color.a != characterAlpha)
                RPG_Animation.instance.GetComponent<Renderer>().material.color = new Color(RPG_Animation.instance.GetComponent<Renderer>().material.color.r, RPG_Animation.instance.GetComponent<Renderer>().material.color.g, RPG_Animation.instance.GetComponent<Renderer>().material.color.b, characterAlpha);

	    } else {

            RPG_Animation.instance.GetComponent<Renderer>().enabled = true;

            if (RPG_Animation.instance.GetComponent<Renderer>().material.color.a != 1)
                RPG_Animation.instance.GetComponent<Renderer>().material.color = new Color(RPG_Animation.instance.GetComponent<Renderer>().material.color.r, RPG_Animation.instance.GetComponent<Renderer>().material.color.g, RPG_Animation.instance.GetComponent<Renderer>().material.color.b, 1);
		}
    }

    Vector3 GetCameraPosition(float xAxis, float yAxis, float distance) {
        Vector3 offset = new Vector3(0, 0, -distance);
        Quaternion rotation = Quaternion.Euler(xAxis, yAxis, 0);
        return cameraPivot.position + rotation * offset;
    }

    float CheckCameraClipPlane(Vector3 from, Vector3 to) {
        var closestDistance = -1f;

        RaycastHit hitInfo;

        ClipPlaneVertexes clipPlane = GetClipPlaneAt(to);

        Debug.DrawLine(clipPlane.UpperLeft, clipPlane.UpperRight);
        Debug.DrawLine(clipPlane.UpperRight, clipPlane.LowerRight);
        Debug.DrawLine(clipPlane.LowerRight, clipPlane.LowerLeft);
        Debug.DrawLine(clipPlane.LowerLeft, clipPlane.UpperLeft);

        Debug.DrawLine(from, to, Color.red);
        Debug.DrawLine(from - transform.right * halfPlaneWidth + transform.up * halfPlaneHeight, clipPlane.UpperLeft, Color.cyan);
        Debug.DrawLine(from + transform.right * halfPlaneWidth + transform.up * halfPlaneHeight, clipPlane.UpperRight, Color.cyan);
        Debug.DrawLine(from - transform.right * halfPlaneWidth - transform.up * halfPlaneHeight, clipPlane.LowerLeft, Color.cyan);
        Debug.DrawLine(from + transform.right * halfPlaneWidth - transform.up * halfPlaneHeight, clipPlane.LowerRight, Color.cyan);

        if (Physics.Linecast(from, to, out hitInfo) && hitInfo.collider.tag != "Player")
            closestDistance = hitInfo.distance - Camera.main.nearClipPlane;

        if (Physics.Linecast(from - transform.right * halfPlaneWidth + transform.up * halfPlaneHeight, clipPlane.UpperLeft, out hitInfo) && hitInfo.collider.tag != "Player")
            if (hitInfo.distance < closestDistance || closestDistance == -1)
                closestDistance = Vector3.Distance(hitInfo.point + transform.right * halfPlaneWidth - transform.up * halfPlaneHeight, from);

        if (Physics.Linecast(from + transform.right * halfPlaneWidth + transform.up * halfPlaneHeight, clipPlane.UpperRight, out hitInfo) && hitInfo.collider.tag != "Player")
            if (hitInfo.distance < closestDistance || closestDistance == -1)
                closestDistance = Vector3.Distance(hitInfo.point - transform.right * halfPlaneWidth - transform.up * halfPlaneHeight, from);

        if (Physics.Linecast(from - transform.right * halfPlaneWidth - transform.up * halfPlaneHeight, clipPlane.LowerLeft, out hitInfo) && hitInfo.collider.tag != "Player")
            if (hitInfo.distance < closestDistance || closestDistance == -1)
                closestDistance = Vector3.Distance(hitInfo.point + transform.right * halfPlaneWidth + transform.up * halfPlaneHeight, from);

        if (Physics.Linecast(from + transform.right * halfPlaneWidth - transform.up * halfPlaneHeight, clipPlane.LowerRight, out hitInfo) && hitInfo.collider.tag != "Player")
            if (hitInfo.distance < closestDistance || closestDistance == -1)
                closestDistance = Vector3.Distance(hitInfo.point - transform.right * halfPlaneWidth + transform.up * halfPlaneHeight, from);

        return closestDistance;
    }

    float ClampAngle(float angle, float min, float max) {
        while (angle < -360 || angle > 360) {
            if (angle < -360)
                angle += 360;
            if (angle > 360)
                angle -= 360;
        }

        return Mathf.Clamp(angle, min, max);
    }

    public struct ClipPlaneVertexes {
        public Vector3 UpperLeft;
        public Vector3 UpperRight;
        public Vector3 LowerLeft;
        public Vector3 LowerRight;
    }

    public static ClipPlaneVertexes GetClipPlaneAt(Vector3 pos) {
        var clipPlane = new ClipPlaneVertexes();

        if (Camera.main == null)
            return clipPlane;

        Transform transform = Camera.main.transform;
        float offset = Camera.main.nearClipPlane;

        clipPlane.UpperLeft = pos - transform.right * halfPlaneWidth;
        clipPlane.UpperLeft += transform.up * halfPlaneHeight;
        clipPlane.UpperLeft += transform.forward * offset;

        clipPlane.UpperRight = pos + transform.right * halfPlaneWidth;
        clipPlane.UpperRight += transform.up * halfPlaneHeight;
        clipPlane.UpperRight += transform.forward * offset;

        clipPlane.LowerLeft = pos - transform.right * halfPlaneWidth;
        clipPlane.LowerLeft -= transform.up * halfPlaneHeight;
        clipPlane.LowerLeft += transform.forward * offset;

        clipPlane.LowerRight = pos + transform.right * halfPlaneWidth;
        clipPlane.LowerRight -= transform.up * halfPlaneHeight;
        clipPlane.LowerRight += transform.forward * offset;

        return clipPlane;
    }

    public void RotateWithCharacter() {
        float rotation = Input.GetAxis("Horizontal") * RPG_Controller.instance.turnSpeed;
        mouseX += rotation;
    }
}


text:
class Solution_Painter {
public:
	Solution_Painter(Configuration level, const std::vector<Configuration>& list, RGB_Image** reference_images);
	RGB_Image paint(bool& error);
private:
	int list_pixel_width();
	int list_pixel_height();
	int solution_pixel_width(Configuration solution);
	void paint_list(RGB_Image& destination);
	void paint_solution(RGB_Image& destination, Configuration level, Configuration solution);
	RGB_Image paint_board_at_offset(RGB_Image& destination, Board& board, Board_State& state, int offset);
	void paint_board(RGB_Image& destination, Board& board, Board_State& state);
private:
	bool* error;
	Configuration level;
	const std::vector<Configuration>& list;
	RGB_Image** reference_images;
};


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />

		<title>JsDoc Reference - JSC3D.Mesh</title>

Class Index
| File Index

Classes

_global_

JSC3D

JSC3D.AABB

JSC3D.BinaryStream

JSC3D.LoaderSelector

JSC3D.Material

JSC3D.Math3D

JSC3D.Matrix3x4

JSC3D.Mesh

JSC3D.ObjLoader

JSC3D.PickInfo

JSC3D.Scene

JSC3D.StlLoader

JSC3D.Texture

JSC3D.Viewer

				Class JSC3D.Mesh

				Mesh

	This class implements mesh that is used as an expression of 3D object and the basic primitive for rendering.

	A mesh basically consists of a sequence of faces, and optioanlly a material, a texture mapping and other attributes and metadata.

	A face consists of 3 or more coplanary vertex that should be descript in counter-clockwise order.

	A texture mapping includes a valid texture object with a sequence of texture coordinats specified per vertex.

Defined in:  jsc3d.js.

Class Summary

						Constructor Attributes
						Constructor Name and Description

								JSC3D.Mesh(name, visible, material, texture, creaseAngle, isDoubleSided, isEnvironmentCast, coordBuffer, indexBuffer, texCoordBuffer, texCoordIndexBuffer)

Field Summary

							Field Attributes
							Field Name and Description

								aabb

The Axis-aligned bounding box of the mesh.

								creaseAngle

An angle to preserve sharp edges in smooth rendering.

								faceCount

Number of faces of the mesh.

								indexBuffer

The sequence of vertex indices that describe faces.

								isDoubleSided

If set to true, both sides of the faces will be rendered.

								isEnvironmentCast

If set to true, the mesh accepts environment mapping.

								name

Name of the mesh.

								texCoordBuffer

The plain sequence of texture coordinates of the mesh, or null if none.

								texCoordIndexBuffer

The sequence of tex coord indices.

								vertexBuffer

The plain sequence of vertex coordinates of the mesh.

								visible

Visibility of the mesh.

Method Summary

							Method Attributes
							Method Name and Description

hasTexture()

See if the mesh has valid texture mapping.

init()

Initialize the mesh.

isTrivial()

See if the mesh is a trivial mesh.

setMaterial(material)

Set material for the mesh.

setRenderMode(mode)

Set render mode of the mesh.

setTexture(texture)

Set texture for the mesh.

					Class Detail

						JSC3D.Mesh(name, visible, material, texture, creaseAngle, isDoubleSided, isEnvironmentCast, coordBuffer, indexBuffer, texCoordBuffer, texCoordIndexBuffer)

Parameters:

								 name

								 visible

								 material

								 texture

								 creaseAngle

								 isDoubleSided

								 isEnvironmentCast

								 coordBuffer

								 indexBuffer

								 texCoordBuffer

								 texCoordIndexBuffer

					Field Detail

					aabb

						The Axis-aligned bounding box of the mesh. Read only.

					creaseAngle

						An angle to preserve sharp edges in smooth rendering. If the angle between the normals of two adjacent faces exceeds this value, the edge will be recognized as an sharp edge thus it will not be smoothed.

					faceCount

						Number of faces of the mesh. Read only.

					indexBuffer

						The sequence of vertex indices that describe faces. Each face contains at least 3 vertex
indices that are ended by a -1. Faces are not limited to triangles.

					isDoubleSided

						If set to true, both sides of the faces will be rendered.

					isEnvironmentCast

						If set to true, the mesh accepts environment mapping.

					name

						Name of the mesh.

					texCoordBuffer

						The plain sequence of texture coordinates of the mesh, or null if none.

					texCoordIndexBuffer

						The sequence of tex coord indices. If it is null, the indexBuffer will be used.

					vertexBuffer

						The plain sequence of vertex coordinates of the mesh.

					visible

						Visibility of the mesh. If it is set to false, the mesh will be ignored in rendering.

					Method Detail

					{Boolean}
					hasTexture()

						See if the mesh has valid texture mapping.

Returns:

{Boolean} true if it has valid texture mapping; false if not.

					init()

						Initialize the mesh.

					{Boolean}
					isTrivial()

						See if the mesh is a trivial mesh. A trivial mesh should be omited in any calculation or rendering.

Returns:

{Boolean} true if it is trivial; false if not.

					setMaterial(material)

						Set material for the mesh.

Parameters:

									{JSC3D.Material} material

the material object.

					setRenderMode(mode)

						Set render mode of the mesh.

	Available render modes are:

	'point':         render meshes as point clouds;

	'wireframe':     render meshes as wireframe;

	'flat':          render meshes as solid objects using flat shading;

	'smooth':        render meshes as solid objects using smooth shading;

	'texture':       render meshes as solid textured objects, no lighting will be apllied;

	'textureflat':   render meshes as solid textured objects, lighting will be calculated per face;

	'texturesmooth': render meshes as solid textured objects, lighting will be calculated per vertex and interpolated.

Parameters:

									{String} mode

new render mode.

					setTexture(texture)

						Set texture for the mesh.

Parameters:

									{JSC3D.Texture} texture

the texture object.

			Documentation generated by JsDoc Toolkit 2.1.0 on Thu Nov 20 2014 00:20:57 GMT+0800 (CST)


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>io.hawt</groupId>
    <artifactId>project</artifactId>
    <version>2.17-SNAPSHOT</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>hawtio-base</artifactId>
  <packaging>war</packaging>
  <name>${project.artifactId}</name>
  <description>hawtio :: Base Web Application</description>

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${servlet-api-version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-war</artifactId>
      <version>${project.version}</version>
      <!--
        NOTE this WAR dependency type which enables this WAR to
        inherit all the plugins and content from the core hawtio-war WAR
      -->
      <type>war</type>
    </dependency>

    <!-- let's mark dependencies from the WAR as provided to avoid jetty:run adding duplicates -->
    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j-version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-version}</version>
        <configuration>
          <webAppSourceDirectory>${project.build.directory}/${project.name}</webAppSourceDirectory>
          <scanIntervalSeconds>1</scanIntervalSeconds>
          <webAppConfig>
            <contextPath>${context}</contextPath>
          </webAppConfig>
          <httpConnector>
            <port>${jettyPort}</port>
            <idleTimeout>60000</idleTimeout>
          </httpConnector>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <port>9090</port>
          <path>${context}</path>
          <systemProperties>
          </systemProperties>
          <useTestClasspath>false</useTestClasspath>
          <!--
                    <warSourceDirectory>${project.build.directory}/${project.name}-${project.version}</warSourceDirectory>
          -->
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat6-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <port>9090</port>
          <path>${context}</path>
          <systemProperties>
          </systemProperties>
          <useTestClasspath>false</useTestClasspath>
          <!--
                    <warSourceDirectory>${project.build.directory}/${project.name}-${project.version}</warSourceDirectory>
          -->
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}/overlays</directory>
              <includes>
                <include>**/*.*</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>


text:
/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1 0 auto;
}

a {
    color: #00e;
}

a:visited {
    color: #551a8b;
}

a:hover {
    color: #06e;
}

/*
 * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
 */

img {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

html{
    /*background: antiquewhite;*/
}

form{
    /*    background-color: aliceblue;
        opacity: 0.8;*/
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/* Prevent callout */

.nocallout {
    -webkit-touch-callout: none;
}

.pressed {
    background-color: rgba(0, 0, 0, 0.7);
}

/* A hack for HTML5 contenteditable attribute on mobile */

textarea[contenteditable] {
    -webkit-appearance: none;
}

/* A workaround for S60 3.x and 5.0 devices which do not animated gif images if
   they have been set as display: none */

.gifhidden {
    position: absolute;
    left: -100%;
}

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    background-repeat: no-repeat;
    border: 0;
    direction: ltr;
    display: block;
    overflow: hidden;
    text-align: left;
    text-indent: -999em;
}

.ir br {
    display: none;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/**
 * Clearfix helper
 * Used to contain floats: h5bp.com/q
 */

.clearfix:before,
.clearfix:after {
    content: "";
    display: table;
}

.clearfix:after {
    clear: both;
}

/* ==========================================================================
   Customize elements
   ========================================================================== */
.inscription{
    display: none;
}

#displayConnection{
    display: none;
}

.linkIC{
    position: relative;
    float: right;
    margin-right: 5%;
}

#formButton{
    text-align: center;
}

#imageBack1{
    width:100%;
    position: absolute;
    opacity: 0.1;
    top: 5%;
}

#logoKorian{
    width: 20%;
    margin: 0px auto auto 38.5%;
}

#erreurInsctiption{
    background-color: firebrick;
}

a#BTetage1, a#BTetage2{
    display: block;
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    height: 100px;
    font-size: 35px;
    padding: 20px;
}

#backToSelectEtage{
    display: none;
}

#BTfooter{
    position: fixed;
    top: 95%;
}

.etage{
    display: none;
}

#divAdmin{
    display: none;
}

#divAgent{
    display: none;
}

.addPrestation{
    display: none;
}

#infoPresta{
    height: 100%;
}
#infoPresta .picker__frame{
    width: 90%;
}
#infoPresta .modal{
    width: 90%;
}

#selectChambreExport{
    display: none;
}

.periodiciteForm{
    display: none;
}
.listPresta{
    cursor: pointer;
    text-decoration: underline;
    color: blue;
}

#nomPrestaGET, #nomPatientGet{
    font-weight: bold;
}

#addPatient, #displayListPatient, #infoChambre{
    display : none;
}

#etage1 li,#etage2 li {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
    text-align: center;
    font-size: 30px;
    padding-bottom: 20px;
}
#backToSelectEtage{
    position: fixed;
    top: 70%;
}

#infoChambre{
    text-align: center;
}

#infoChambre input, #infoChambre label {
    width: 50px;
}

/*#infoChambre [type="checkbox"] + label:before, [type="checkbox"]:not(.filled-in) + label:after{
    width: 40px;
    height: 40px;
}*/

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   Theses examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 800px) {
    /* Style adjustments for viewports that meet the condition */
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-resolution: 144dpi) {
    /* Style adjustments for viewports that meet the condition */
}