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

import java.io.Serializable;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * Container for the parameters to the {@link com.amazonaws.services.rds.AmazonRDS#removeSourceIdentifierFromSubscription(RemoveSourceIdentifierFromSubscriptionRequest) RemoveSourceIdentifierFromSubscription operation}.
 *

 * Removes a source identifier from an existing RDS event notification
 * subscription.
 *

 *
 * @see com.amazonaws.services.rds.AmazonRDS#removeSourceIdentifierFromSubscription(RemoveSourceIdentifierFromSubscriptionRequest)
 */
public class RemoveSourceIdentifierFromSubscriptionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * The name of the RDS event notification subscription you want to remove
     * a source identifier from.
     */
    private String subscriptionName;

    /**
     * The source identifier to be removed from the subscription, such as the
     * DB instance identifier for a DB instance or the name of a
     * security group.
     */
    private String sourceIdentifier;

    /**
     * The name of the RDS event notification subscription you want to remove
     * a source identifier from.
     *
     * @return The name of the RDS event notification subscription you want to remove
     *         a source identifier from.
     */
    public String getSubscriptionName() {
        return subscriptionName;
    }

    /**
     * The name of the RDS event notification subscription you want to remove
     * a source identifier from.
     *
     * @param subscriptionName The name of the RDS event notification subscription you want to remove
     *         a source identifier from.
     */
    public void setSubscriptionName(String subscriptionName) {
        this.subscriptionName = subscriptionName;
    }

    /**
     * The name of the RDS event notification subscription you want to remove
     * a source identifier from.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param subscriptionName The name of the RDS event notification subscription you want to remove
     *         a source identifier from.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RemoveSourceIdentifierFromSubscriptionRequest withSubscriptionName(String subscriptionName) {
        this.subscriptionName = subscriptionName;
        return this;
    }

    /**
     * The source identifier to be removed from the subscription, such as the
     * DB instance identifier for a DB instance or the name of a
     * security group.
     *
     * @return The source identifier to be removed from the subscription, such as the
     *         DB instance identifier for a DB instance or the name of a
     *         security group.
     */
    public String getSourceIdentifier() {
        return sourceIdentifier;
    }

    /**
     * The source identifier to be removed from the subscription, such as the
     * DB instance identifier for a DB instance or the name of a
     * security group.
     *
     * @param sourceIdentifier The source identifier to be removed from the subscription, such as the
     *         DB instance identifier for a DB instance or the name of a
     *         security group.
     */
    public void setSourceIdentifier(String sourceIdentifier) {
        this.sourceIdentifier = sourceIdentifier;
    }

    /**
     * The source identifier to be removed from the subscription, such as the
     * DB instance identifier for a DB instance or the name of a
     * security group.
     *

     * Returns a reference to this object so that method calls can be chained together.
     *
     * @param sourceIdentifier The source identifier to be removed from the subscription, such as the
     *         DB instance identifier for a DB instance or the name of a
     *         security group.
     *
     * @return A reference to this updated object so that method calls can be chained
     *         together.
     */
    public RemoveSourceIdentifierFromSubscriptionRequest withSourceIdentifier(String sourceIdentifier) {
        this.sourceIdentifier = sourceIdentifier;
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and
     * debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getSubscriptionName() != null) sb.append("SubscriptionName: " + getSubscriptionName() + ",");
        if (getSourceIdentifier() != null) sb.append("SourceIdentifier: " + getSourceIdentifier() );
        sb.append("}");
        return sb.toString();
    }

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

        hashCode = prime * hashCode + ((getSubscriptionName() == null) ? 0 : getSubscriptionName().hashCode());
        hashCode = prime * hashCode + ((getSourceIdentifier() == null) ? 0 : getSourceIdentifier().hashCode());
        return hashCode;
    }

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

        if (obj instanceof RemoveSourceIdentifierFromSubscriptionRequest == false) return false;
        RemoveSourceIdentifierFromSubscriptionRequest other = (RemoveSourceIdentifierFromSubscriptionRequest)obj;

        if (other.getSubscriptionName() == null ^ this.getSubscriptionName() == null) return false;
        if (other.getSubscriptionName() != null && other.getSubscriptionName().equals(this.getSubscriptionName()) == false) return false;
        if (other.getSourceIdentifier() == null ^ this.getSourceIdentifier() == null) return false;
        if (other.getSourceIdentifier() != null && other.getSourceIdentifier().equals(this.getSourceIdentifier()) == false) return false;
        return true;
    }

    @Override
    public RemoveSourceIdentifierFromSubscriptionRequest clone() {

            return (RemoveSourceIdentifierFromSubscriptionRequest) super.clone();
    }

}


text:
@implementation CalendrierViewController
@synthesize liveWebView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{

    self.title = NSLocalizedString(@"Calendar", nil);
    //    self.navigationController.navigationBar.tintColor= [[UIColor alloc] initWithRed:0.0/255 green:49.0/255 blue:83.0/255 alpha:1.0];

	url = [NSURL URLWithString:NSLocalizedString(@"AllEvents", nil)];
	NSURLRequest *requete = [NSURLRequest requestWithURL:url];
	[liveWebView loadRequest:requete];
	liveWebView.scalesPageToFit = TRUE;
    liveWebView.delegate = self;

    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.

}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (IBAction)showMenu
{
    [self.sideMenuViewController presentMenuViewController];
}

- (IBAction)refresh{
    [liveWebView reload];
	liveWebView.scalesPageToFit = YES;
}

#pragma mark WEBVIEW delegate Methods

- (void)webViewDidStartLoad:(UIWebView *)webView
{
	[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
	[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

redpajama_set_name: RedPajamaGithub


text:
module TimeTravel
  def self.included(mod)
    mod.before{stop_time}
  end

  def stop_time
    warp_to Time.now
  end

  def warp_to(time)
    time = Time.parse(time) if time.is_a?(String)
    Time.stubs(:now).returns(time)
  end

  def warp_ahead(duration)
    new_now = Time.now + duration
    Time.stubs(:now).returns(new_now)
    new_now
  end
end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Rambo (Ed. ), Iheringia, Sér. Bot. 5: 184 (1959)

#### Original name
Radulochaete flavoalutacea Rick

### Remarks
null


text:
package com.datatorrent.apps;

import java.util.List;
import java.util.Map;

import org.apache.apex.malhar.lib.fs.GenericFileOutputOperator.StringFileOutputOperator;
import org.apache.hadoop.conf.Configuration;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import com.datatorrent.api.Context.PortContext;
import com.datatorrent.api.DAG;
import com.datatorrent.api.StreamingApplication;
import com.datatorrent.api.annotation.ApplicationAnnotation;
import com.datatorrent.contrib.formatter.CsvFormatter;
import com.datatorrent.lib.db.jdbc.JdbcPOJOPollInputOperator;
import com.datatorrent.lib.db.jdbc.JdbcStore;
import com.datatorrent.lib.transform.TransformOperator;
import com.datatorrent.lib.util.FieldInfo;
import com.datatorrent.lib.util.FieldInfo.SupportType;

@ApplicationAnnotation(name = "Database-to-HDFS-Sync")
public class Application implements StreamingApplication
{
  public void populateDAG(DAG dag, Configuration conf)
  {
    JdbcPOJOPollInputOperator poller = dag.addOperator("JdbcPoller", new JdbcPOJOPollInputOperator());

    JdbcStore store = new JdbcStore();
    poller.setStore(store);
    poller.setFieldInfos(addFieldInfos());

    CsvFormatter formatter = dag.addOperator("formatter", new CsvFormatter());

    StringFileOutputOperator fileOutput = dag.addOperator("fileOutput", new StringFileOutputOperator());

    dag.addStream("dbrecords", poller.outputPort, formatter.in);
    dag.addStream("string", formatter.out, fileOutput.input);
    dag.setInputPortAttribute(formatter.in, PortContext.PARTITION_PARALLEL, true);
    dag.setInputPortAttribute(fileOutput.input, PortContext.PARTITION_PARALLEL, true);

    /*
     * To add custom logic to your DAG, add your custom operator here with
     * dag.addOperator api call and connect it in the dag using the dag.addStream
     * api call.
     *
     * For example:
     *
     * To add the transformation operator in the DAG, use the following block of
     * code.
     *
     * TransformOperator transform = dag.addOperator("transform", new TransformOperator());
     * Map<String, String> expMap = Maps.newHashMap();
     * expMap.put("name", "{$.name}.toUpperCase()");
     * transform.setExpressionMap(expMap);
     *
     * And to connect it in the DAG as follows:
     * JdbcPoller --> Transform --> Formatter --> FileOutput
     *
     * Replace the following line:
     * dag.addStream("dbrecords", poller.outputPort, formatter.in);
     *
     * with the following two lines:
     * dag.addStream("dbrecords", poller.outputPort, transform.input);
     * dag.addStream("transformed", transform.output, formatter.in);
     *
     */

  }

  /**
   * This method can be modified to have field mappings based on used defined
   * class
   */
  private List<FieldInfo> addFieldInfos()
  {
    List<FieldInfo> fieldInfos = Lists.newArrayList();

    /*
     * To use this application with custom schema add field info mapping as shown
     * on the following line:
     * fieldInfos.add(new FieldInfo("DATABASE_COLUMN_NAME", "pojoFieldName", SupportType.DATABASE_COLUMN_TYPE));
     *
     * Also, update TUPLE_CLASS property from the xml configuration files.
     */
    fieldInfos.add(new FieldInfo("account_no", "accountNumber", SupportType.INTEGER));
    fieldInfos.add(new FieldInfo("name", "name", SupportType.STRING));
    fieldInfos.add(new FieldInfo("amount", "amount", SupportType.INTEGER));
    return fieldInfos;
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Context useNaming="true" reloadable="${dollar}{web.context.reloadable}">
    <Resources cachingAllowed="true" cacheMaxSize="100000"/>
</Context>


text:
import React, { Component } from 'react';
import * as firebase from 'firebase';
import '../index.css';
const diceFaces = require('./diceFaces.js').dice;
var rolldice = require("./Roll.js"),
    user = window.location.search.slice(1),
    channel = window.location.pathname.slice(1).toLowerCase();

class fortune extends Component {
  constructor(props) {
    super(props);
    this.state = {
      messageRef: firebase.database().ref().child(`${channel}`).child('message'),
      displayFaces: {},
      swap: {},
    };
  }

  componentDidMount() {
    let diceResult = this.props.diceResult;
    let rebuilt = this.props.rebuilt;
    let displayFaces = {};
    this.refs.caption.value = rebuilt.caption;
    Object.keys(diceFaces).forEach((color)=>{
      if (diceResult.roll[color] !== undefined){
        for (var i=0; diceResult.roll[color].length>i; i++){
          displayFaces[color+i] = {};
          if (color === 'yellow' || color === 'green' ||  color === 'blue' ||  color === 'red' ||  color === 'purple' ||  color === 'black' || color === 'white') {
            displayFaces[color+i].current = {color: color, position: i, path: `/images/dice/${color}-${diceFaces[color][diceResult.roll[color][i]].face}.png`, key: color + i + 'current'};
            displayFaces[color+i].fortune = {};
            diceFaces[color][diceResult.roll[color][i]].adjacentposition.forEach((fortuneRoll)=>{
              displayFaces[color+i].fortune[fortuneRoll] = {key: color + i + 'fortune' + fortuneRoll, color: color, position: i, roll: fortuneRoll, path:`/images/dice/${color}-${diceFaces[color][fortuneRoll].face}.png`, display: 'none'};
            })
          }
          else displayFaces[color+i] = {current:{color: color, position: i,  path: `/images/${color}.png`, key: color + i + 'current'}, fortune: {}};
        }
      }
    })
    this.setState({displayFaces});
  }

  swap() {
    let diceResult = this.props.diceResult;
    let swap = Object.assign({}, this.state.swap);
    Object.keys(swap).forEach((key)=>{
      diceResult.roll[swap[key].color].splice(swap[key].position, 1, swap[key].roll);
    });
    diceResult.text = `<span> ${user} swapped dice faces </span>`;
    diceResult = rolldice.countSymbols(diceResult, user);
    if (this.refs.caption.value !== '') {
      diceResult.caption = this.refs.caption.value;
      diceResult.text += `<span> ${this.refs.caption.value} </span>`;
    }
    if (diceResult.text !== undefined) this.state.messageRef.push().set(diceResult);
    this.props.popupClose();
  }

   selectDice(row, fortuneRoll) {
     let displayFaces = Object.assign({}, this.state.displayFaces);
     let swap = Object.assign({}, this.state.swap);
     Object.keys(displayFaces[row].fortune).forEach((roll)=>{
       displayFaces[row].fortune[roll].display = 'none';
     });
     displayFaces[row].fortune[fortuneRoll].display = 'block'
     swap[row] = {color: displayFaces[row].fortune[fortuneRoll].color, position: displayFaces[row].fortune[fortuneRoll].position, roll: displayFaces[row].fortune[fortuneRoll].roll}
     this.setState({displayFaces});
     this.setState({swap});
   }

  render() {
    return (

Select Faces You Would Like To Swap

            {Object.keys(this.state.displayFaces).map((row)=> {
              return(

                <div key={this.state.displayFaces[row].current.key} className='dice rerollselect' style={{backgroundImage: `url(${this.state.displayFaces[row].current.path})`, borderRightStyle: 'groove'}}>

                  {Object.keys(this.state.displayFaces[row].fortune).map((fortuneRoll)=> {
                    return(
                    <div key={this.state.displayFaces[row].fortune[fortuneRoll].key} className='dice rerollselect' style={{backgroundImage: `url(${this.state.displayFaces[row].fortune[fortuneRoll].path})`}} onClick={this.selectDice.bind(this, row, fortuneRoll)}>

                  )})}

            )})}

          <input type='button' ref='swap' className='lrgButton' onClick={this.swap.bind(this)} value='Swap' />
          <input className='textinput' ref='caption' name='caption' placeholder='caption' style={{width: '150px', paddingLeft: '5px'}}/>

    );
  }
}
export default fortune;


text:
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'

import { appLocation } from '../routes'
import CreatePetition from './create-petition-legacy'

class CreateRevise extends React.Component {
  componentDidMount() {
    if (!this.props.hasPetition) appLocation.push('/create_start.html')
  }

  render() {
    if (!this.props.hasPetition) return null // We will also redirect in componentDidMount
    return <CreatePetition initialPetition={this.props.petition} />
  }
}

function mapStateToProps({ petitionCreateStore }) {
  return {
    hasPetition: !!(
      petitionCreateStore &&
      petitionCreateStore.title &&
      !petitionCreateStore.submitted
    ),
    petition: petitionCreateStore
  }
}

CreateRevise.propTypes = {
  hasPetition: PropTypes.bool,
  petition: PropTypes.object
}

export default connect(mapStateToProps)(CreateRevise)


text:
package org.onosproject.ui.impl.topo;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.base.Strings;
import org.onlab.osgi.ServiceDirectory;
import org.onlab.packet.IpAddress;
import org.onosproject.cluster.ClusterService;
import org.onosproject.cluster.ControllerNode;
import org.onosproject.cluster.NodeId;
import org.onosproject.net.statistic.PortStatisticsService;
import org.onosproject.mastership.MastershipService;
import org.onosproject.net.Annotated;
import org.onosproject.net.Annotations;
import org.onosproject.net.Device;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Host;
import org.onosproject.net.device.DeviceService;
import org.onosproject.net.flow.FlowRuleService;
import org.onosproject.net.host.HostService;
import org.onosproject.net.intent.IntentService;
import org.onosproject.net.link.LinkService;
import org.onosproject.net.region.Region;
import org.onosproject.net.statistic.StatisticService;
import org.onosproject.net.topology.TopologyService;
import org.onosproject.ui.GlyphConstants;
import org.onosproject.ui.JsonUtils;
import org.onosproject.ui.UiExtensionService;
import org.onosproject.ui.UiPreferencesService;
import org.onosproject.ui.UiTopoMap;
import org.onosproject.ui.UiTopoMapFactory;
import org.onosproject.ui.model.topo.UiClusterMember;
import org.onosproject.ui.model.topo.UiDevice;
import org.onosproject.ui.model.topo.UiElement;
import org.onosproject.ui.model.topo.UiHost;
import org.onosproject.ui.model.topo.UiLink;
import org.onosproject.ui.model.topo.UiLinkId;
import org.onosproject.ui.model.topo.UiModelEvent;
import org.onosproject.ui.model.topo.UiNode;
import org.onosproject.ui.model.topo.UiRegion;
import org.onosproject.ui.model.topo.UiSynthLink;
import org.onosproject.ui.model.topo.UiTopoLayout;
import org.onosproject.ui.topo.LayoutLocation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import static com.google.common.base.Preconditions.checkNotNull;
import static org.onosproject.net.AnnotationKeys.GRID_X;
import static org.onosproject.net.AnnotationKeys.GRID_Y;
import static org.onosproject.net.AnnotationKeys.LATITUDE;
import static org.onosproject.net.AnnotationKeys.LONGITUDE;
import static org.onosproject.ui.model.topo.UiNode.LAYER_DEFAULT;
import static org.onosproject.ui.topo.LayoutLocation.fromCompactListString;

/**
 * Facility for creating JSON messages to send to the topology view in the
 * Web client.
 */
public class Topo2Jsonifier {

    private static final String E_DEF_NOT_LAST =
            "UiNode.LAYER_DEFAULT not last in layer list";
    private static final String E_UNKNOWN_UI_NODE =
            "Unknown subclass of UiNode: ";

    private static final String CONTEXT_KEY_DELIM = "_";
    private static final String NO_CONTEXT = "";
    private static final String ZOOM_KEY = "layoutZoom";

    private static final String REGION = "region";
    private static final String DEVICE = "device";
    private static final String HOST = "host";
    private static final String TYPE = "type";
    private static final String SUBJECT = "subject";
    private static final String DATA = "data";
    private static final String MEMO = "memo";

    private static final String GEO = "geo";
    private static final String GRID = "grid";
    private static final String PEER_LOCATIONS = "peerLocations";
    private static final String LOCATION = "location";
    private static final String LOC_TYPE = "locType";
    private static final String LAT_OR_Y = "latOrY";
    private static final String LONG_OR_X = "longOrX";

    private final Logger log = LoggerFactory.getLogger(getClass());

    private final ObjectMapper mapper = new ObjectMapper();

    // preferences are stored per user name...
    private final String userName;

    private ServiceDirectory directory;
    private ClusterService clusterService;
    private DeviceService deviceService;
    private LinkService linkService;
    private HostService hostService;
    private MastershipService mastershipService;
    private IntentService intentService;
    private FlowRuleService flowService;
    private StatisticService flowStatsService;
    private PortStatisticsService portStatsService;
    private TopologyService topologyService;
    private UiExtensionService uiextService;
    private UiPreferencesService prefService;

    // NOTE: we'll stick this here for now, but maybe there is a better home?
    //       (this is not distributed across the cluster)
    private static Map<String, ObjectNode> metaUi = new ConcurrentHashMap<>();

    /**
     * Creates an instance with a reference to the services directory, so that
     * additional information about network elements may be looked up on
     * on the fly.
     *
     * @param directory service directory
     * @param userName  logged in user name
     */
    public Topo2Jsonifier(ServiceDirectory directory, String userName) {
        this.directory = checkNotNull(directory, "Directory cannot be null");
        this.userName = checkNotNull(userName, "User name cannot be null");

        clusterService = directory.get(ClusterService.class);
        deviceService = directory.get(DeviceService.class);
        linkService = directory.get(LinkService.class);
        hostService = directory.get(HostService.class);
        mastershipService = directory.get(MastershipService.class);
        intentService = directory.get(IntentService.class);
        flowService = directory.get(FlowRuleService.class);
        flowStatsService = directory.get(StatisticService.class);
        portStatsService = directory.get(PortStatisticsService.class);
        topologyService = directory.get(TopologyService.class);
        uiextService = directory.get(UiExtensionService.class);
        prefService = directory.get(UiPreferencesService.class);
    }

    // for unit testing
    Topo2Jsonifier() {
        userName = "(unit-test)";
    }

    private ObjectNode objectNode() {
        return mapper.createObjectNode();
    }

    private ArrayNode arrayNode() {
        return mapper.createArrayNode();
    }

    private String nullIsEmpty(Object o) {
        return o == null ? "" : o.toString();
    }

    /**
     * Returns a JSON representation of the cluster members (ONOS instances).
     *
     * @param instances the instance model objects
     * @return a JSON representation of the data
     */
    ObjectNode instances(List<UiClusterMember> instances) {
        NodeId local = clusterService.getLocalNode().id();
        ObjectNode payload = objectNode();

        ArrayNode members = arrayNode();
        payload.set("members", members);
        for (UiClusterMember member : instances) {
            members.add(json(member, member.id().equals(local)));
        }

        return payload;
    }

    private ObjectNode json(UiClusterMember member, boolean isUiAttached) {
        int switchCount = mastershipService.getDevicesOf(member.id()).size();
        return jsonCommon(member).put("uiAttached", isUiAttached)
                .put("switches", switchCount);
    }

    /**
     * Returns a JSON representation of the layout to use for displaying in
     * the topology view. The identifiers and names of regions from the
     * current to the root is included, so that the bread-crumb widget can
     * be rendered.
     *
     * @param layout the layout to transform
     * @param crumbs list of layouts in bread-crumb order
     * @return a JSON representation of the data
     */
    ObjectNode layout(UiTopoLayout layout, List<UiTopoLayout> crumbs) {
        ObjectNode result = objectNode()
                .put("id", layout.id().toString())
                .put("parent", nullIsEmpty(layout.parent()))
                .put("region", nullIsEmpty(layout.regionId()))
                .put("regionName", UiRegion.safeName(layout.region()));
        addCrumbs(result, crumbs);
        addBgRef(result, layout);
        return result;
    }

    private void addBgRef(ObjectNode result, UiTopoLayout layout) {
        String mapId = layout.geomap();
        String sprId = layout.sprites();

        if (mapId != null) {
            result.put("bgType", GEO).put("bgId", mapId);
            addMapParameters(result, mapId);
        } else if (sprId != null) {
            result.put("bgType", GRID).put("bgId", sprId);
        }

        attachZoomData(result, layout);
    }

    private void attachZoomData(ObjectNode result, UiTopoLayout layout) {

        ObjectNode zoomData = objectNode();

        // first, set configured scale and offset
        addCfgZoomData(zoomData, layout);

        // next, retrieve user-set zoom data, if we have it
        String rid = layout.regionId().toString();
        ObjectNode userZoom = metaUi.get(contextKey(rid, ZOOM_KEY));
        if (userZoom != null) {
            zoomData.set("usr", userZoom);
        }
        result.set("bgZoom", zoomData);
    }

    private void addCfgZoomData(ObjectNode data, UiTopoLayout layout) {
        ObjectNode zoom = objectNode();
        zoom.put("scale", layout.scale());
        zoom.put("offsetX", layout.offsetX());
        zoom.put("offsetY", layout.offsetY());
        data.set("cfg", zoom);
    }

    private void addMapParameters(ObjectNode result, String mapId) {

        // TODO: This ought to be written more efficiently.

        // ALSO: Should retrieving a UiTopoMap by ID be something that
        //       the UiExtensionService provides, along with other
        //       useful lookups?
        //
        //       Or should it remain very basic / general?
        //
        //       return uiextService.getTopoMap(String mapId);

        final UiTopoMap[] map = {null};

        uiextService.getExtensions().forEach(ext -> {
            UiTopoMapFactory factory = ext.topoMapFactory();

            // TODO: use .stream().filter(...) here
            if (map[0] == null && factory != null) {
                List<UiTopoMap> topoMaps = factory.geoMaps();

                topoMaps.forEach(m -> {
                    if (map[0] == null && m.id().equals(mapId)) {
                        map[0] = m;
                    }
                });
            }
        });

        UiTopoMap m = map[0];
        if (m != null) {
            result.put("bgDesc", m.description())
                    .put("bgFilePath", m.filePath())
                    .put("bgDefaultScale", m.scale());
        } else {
            result.put("bgWarn", "no map registered with id: " + mapId);
        }
    }

    private void addCrumbs(ObjectNode result, List<UiTopoLayout> crumbs) {
        ArrayNode trail = arrayNode();
        crumbs.forEach(c -> {
            ObjectNode n = objectNode()
                    .put("id", c.regionId().toString())
                    .put("name", UiRegion.safeName(c.region()));
            trail.add(n);
        });
        result.set("crumbs", trail);
    }

    /**
     * Returns a JSON representation of the region to display in the topology
     * view.
     *
     * @param region     the region to transform to JSON
     * @param subRegions the subregions within this region
     * @param links      the links within this region
     * @return a JSON representation of the data
     */
    ObjectNode region(UiRegion region, Set<UiRegion> subRegions,
                      List<UiSynthLink> links) {
        ObjectNode payload = objectNode();
        if (region == null) {
            payload.put("note", "no-region");
            return payload;
        }

        String ridStr = region.idAsString();

        payload.put("id", ridStr);
        payload.set("subregions", jsonSubRegions(ridStr, subRegions));
        payload.set("links", jsonLinks(links));

        List<String> layerTags = region.layerOrder();
        List<Set<UiNode>> splitDevices = splitByLayer(layerTags, region.devices());
        List<Set<UiNode>> splitHosts = splitByLayer(layerTags, region.hosts());

        payload.set("devices", jsonGrouped(ridStr, splitDevices));
        payload.set("hosts", jsonGrouped(ridStr, splitHosts));
        payload.set("layerOrder", jsonStrings(layerTags));

        if (!region.isRoot()) {
            addPeerLocations(payload, region.backingRegion());
        }

        return payload;
    }

    private ArrayNode jsonSubRegions(String ridStr, Set<UiRegion> subregions) {
        ArrayNode kids = arrayNode();
        subregions.forEach(s -> kids.add(jsonClosedRegion(ridStr, s)));
        return kids;
    }

    protected JsonNode jsonLinks(List<UiSynthLink> links) {
        return collateSynthLinks(links);
    }

    private ArrayNode jsonStrings(List<String> strings) {
        ArrayNode array = arrayNode();
        strings.forEach(array::add);
        return array;
    }

    private ArrayNode jsonGrouped(String ridStr, List<Set<UiNode>> groupedNodes) {
        ArrayNode result = arrayNode();
        groupedNodes.forEach(g -> {
            ArrayNode subset = arrayNode();
            g.forEach(n -> subset.add(json(ridStr, n)));
            result.add(subset);
        });
        return result;
    }

    /**
     * Creates a JSON representation of a UI element.
     *
     * @param element the source element
     * @return a JSON representation of that element
     */
    public ObjectNode jsonUiElement(UiElement element) {
        if (element instanceof UiNode) {
            return json(NO_CONTEXT, (UiNode) element);
        }
        if (element instanceof UiLink) {
            return json((UiLink) element);
        }
        if (element instanceof UiClusterMember) {
            return json((UiClusterMember) element);
        }

        // Unrecognized UiElement class
        return objectNode()
                .put("warning", "unknown UiElement... cannot encode")
                .put("javaclass", element.getClass().toString());
    }

    /**
     * Creates a JSON representation of a UI model event.
     *
     * @param modelEvent the source model event
     * @return a JSON representation of that event
     */
    public ObjectNode jsonEvent(UiModelEvent modelEvent) {
        ObjectNode payload = objectNode();
        payload.put(TYPE, enumToString(modelEvent.type()));
        payload.put(SUBJECT, modelEvent.subject().idAsString());
        payload.set(DATA, modelEvent.data());
        payload.put(MEMO, modelEvent.memo());
        return payload;
    }

    // TODO: Investigate why we can't do this inline
    private String enumToString(Enum<?> e) {
        return e.toString();
    }

    // Returns the name of the master node for the specified device id.
    private String master(DeviceId deviceId) {
        NodeId master = mastershipService.getMasterFor(deviceId);
        return master != null ? master.toString() : "";
    }

    private ObjectNode json(String ridStr, UiNode node) {
        if (node instanceof UiRegion) {
            return jsonClosedRegion(ridStr, (UiRegion) node);
        }
        if (node instanceof UiDevice) {
            return json(ridStr, (UiDevice) node);
        }
        if (node instanceof UiHost) {
            return json(ridStr, (UiHost) node);
        }
        throw new IllegalStateException(E_UNKNOWN_UI_NODE + node.getClass());
    }

    private ObjectNode json(String ridStr, UiDevice device) {
        ObjectNode node = objectNode()
                .put("id", device.idAsString())
                .put("nodeType", DEVICE)
                .put("type", device.type())
                .put("online", deviceService.isAvailable(device.id()))
                .put("master", master(device.id()))
                .put("layer", device.layer());
        Device d = device.backingDevice();
        if (d != null) {
            addProps(node, d);
            addGeoGridLocation(node, d);
        }
        addMetaUi(node, ridStr, device.idAsString());

        return node;
    }

    private void addProps(ObjectNode node, Annotated a) {
        Annotations annot = a.annotations();
        ObjectNode props = objectNode();
        if (annot != null) {
            annot.keys().forEach(k -> props.put(k, annot.value(k)));
        }
        node.set("props", props);
    }

    private void addMetaUi(ObjectNode node, String ridStr, String metaInstanceId) {
        String key = contextKey(ridStr, metaInstanceId);
        ObjectNode meta = metaUi.get(key);
        if (meta != null) {
            node.set("metaUi", meta);
        }
    }

    private void addGeoGridLocation(ObjectNode node, Annotated a) {
        List<String> latLongData = getAnnotValues(a, LATITUDE, LONGITUDE);
        List<String> gridYXdata = getAnnotValues(a, GRID_Y, GRID_X);

        if (latLongData != null) {
            attachLocation(node, GEO, latLongData);
        } else if (gridYXdata != null) {
            attachLocation(node, GRID, gridYXdata);
        }
    }

    private void attachLocation(ObjectNode node, String locType,
                                List<String> values) {
        try {
            double latOrY = Double.parseDouble(values.get(0));
            double longOrX = Double.parseDouble(values.get(1));
            ObjectNode loc = objectNode()
                    .put(LOC_TYPE, locType)
                    .put(LAT_OR_Y, latOrY)
                    .put(LONG_OR_X, longOrX);
            node.set(LOCATION, loc);

        } catch (NumberFormatException e) {
            log.warn("Invalid {} data: lat/Y={}, long/X={}",
                     locType, values.get(0), values.get(1));
        }
    }

    private void addPeerLocations(ObjectNode node, Region r) {
        String compact = r.annotations().value(PEER_LOCATIONS);
        if (!Strings.isNullOrEmpty(compact)) {
            List<LayoutLocation> locs = fromCompactListString(compact);

            ObjectNode o = objectNode();
            for (LayoutLocation ll : locs) {
                ObjectNode lnode = objectNode()
                        .put(LOC_TYPE, ll.locType().toString())
                        .put(LAT_OR_Y, ll.latOrY())
                        .put(LONG_OR_X, ll.longOrX());
                o.set(ll.id(), lnode);
            }

            node.set(PEER_LOCATIONS, o);
        }
    }

    private void addIps(ObjectNode node, Host h) {
        Set<IpAddress> ips = h.ipAddresses();

        ArrayNode a = arrayNode();
        for (IpAddress ip : ips) {
            a.add(ip.toString());
        }

        node.set("ips", a);
    }

    // return list of string values from annotated instance, for given keys
    // return null if any keys are not present
    List<String> getAnnotValues(Annotated a, String... annotKeys) {
        List<String> result = new ArrayList<>(annotKeys.length);
        for (String k : annotKeys) {
            String v = a.annotations().value(k);
            if (v == null) {
                return null;
            }
            result.add(v);
        }
        return result;
    }

    // derive JSON object from annotations
    private ObjectNode props(Annotations annotations) {
        ObjectNode p = objectNode();
        if (annotations != null) {
            annotations.keys().forEach(k -> p.put(k, annotations.value(k)));
        }
        return p;
    }

    private ObjectNode json(String ridStr, UiHost host) {
        ObjectNode node = objectNode()
                .put("id", host.idAsString())
                .put("nodeType", HOST)
                .put("layer", host.layer());
        // TODO: complete host details
        Host h = host.backingHost();

        // h will be null, for example, after a HOST_REMOVED event
        if (h != null) {
            addIps(node, h);
            addProps(node, h);
            addGeoGridLocation(node, h);
            node.put("configured", h.configured());
        }
        addMetaUi(node, ridStr, host.idAsString());

        return node;
    }

    private ArrayNode collateSynthLinks(List<UiSynthLink> links) {
        Map<UiLinkId, Set<UiSynthLink>> collation = new HashMap<>();

        // first, group together the synthlinks into sets per ID...
        for (UiSynthLink sl : links) {
            UiLinkId id = sl.link().id();
            Set<UiSynthLink> rollup =
                    collation.computeIfAbsent(id, k -> new HashSet<>());
            rollup.add(sl);
        }

        // now add json nodes per set, and return the array of them
        ArrayNode array = arrayNode();
        for (UiLinkId id : collation.keySet()) {
            array.add(json(collation.get(id)));
        }
        return array;
    }

    private ObjectNode json(Set<UiSynthLink> memberSet) {
        ArrayNode rollup = arrayNode();
        ObjectNode node = null;

        boolean first = true;
        for (UiSynthLink member : memberSet) {
            UiLink link = member.link();
            if (first) {
                node = json(link);
                first = false;
            }
            rollup.add(json(member.original()));
        }
        if (node != null) {
            node.set("rollup", rollup);
        }
        return node;
    }

    private ObjectNode json(UiLink link) {
        ObjectNode data = objectNode()
                .put("id", link.idAsString())
                .put("epA", link.endPointA())
                .put("epB", link.endPointB())
                .put("type", link.type());
        String pA = link.endPortA();
        String pB = link.endPortB();
        if (pA != null) {
            data.put("portA", pA);
        }
        if (pB != null) {
            data.put("portB", pB);
        }
        return data;
    }

    private ObjectNode json(UiClusterMember member) {
        return jsonCommon(member).put(GlyphConstants.UI_ATTACHED,
                clusterService.getLocalNode().equals(member.backingNode()));
    }

    private ObjectNode jsonCommon(UiClusterMember member) {
        ControllerNode.State state = clusterService.getState(member.id());
        ControllerNode node = member.backingNode();
        if (node != null) {
            IpAddress nodeIp = member.backingNode().ip();
            return objectNode()
                    .put("id", member.idAsString())
                    .put("ip", nodeIp != null ? nodeIp.toString() : node.host())
                    .put("online", state.isActive())
                    .put("ready", state.isReady());
        }
        return objectNode()
                .put("id", member.idAsString())
                .put("ip", "NONE")
                .put("online", false)
                .put("ready", false);
    }

    private ObjectNode jsonClosedRegion(String ridStr, UiRegion region) {
        ObjectNode node = objectNode()
                .put("id", region.idAsString())
                .put("name", region.name())
                .put("nodeType", REGION)
                .put("nDevs", region.deviceCount())
                .put("nHosts", region.hostCount());
        // TODO: device and host counts should take into account any nested
        //       subregions. i.e. should be the sum of all devices/hosts in
        //       all descendant subregions.

        Region r = region.backingRegion();
        if (r != null) {
            // add data injected via network configuration script
            addGeoGridLocation(node, r);
            addProps(node, r);
        }

        // this may contain location data, as dragged by user
        // (which should take precedence, over configured data)
        addMetaUi(node, ridStr, region.idAsString());
        return node;
    }

    /**
     * Returns a JSON array representation of a set of regions/devices. Note
     * that the information is sufficient for showing regions as nodes.
     * THe region ID string defines the context (which region) the node is
     * being displayed in.
     *
     * @param ridStr region-id string
     * @param nodes  the nodes
     * @return a JSON representation of the nodes
     */
    public ArrayNode closedNodes(String ridStr, Set<UiNode> nodes) {
        ArrayNode array = arrayNode();
        for (UiNode node : nodes) {
            if (node instanceof UiRegion) {
                array.add(jsonClosedRegion(ridStr, (UiRegion) node));
            } else if (node instanceof UiDevice) {
                array.add(json(ridStr, (UiDevice) node));
            } else {
                log.warn("Unexpected node instance: {}", node.getClass());
            }
        }
        return array;
    }

    // package-private for unit testing
    List<Set<UiNode>> splitByLayer(List<String> layerTags,
                                   Set<? extends UiNode> nodes) {
        final int nLayers = layerTags.size();
        if (!layerTags.get(nLayers - 1).equals(LAYER_DEFAULT)) {
            throw new IllegalArgumentException(E_DEF_NOT_LAST);
        }

        List<Set<UiNode>> splitList = new ArrayList<>(layerTags.size());
        Map<String, Set<UiNode>> byLayer = new HashMap<>(layerTags.size());

        for (String tag : layerTags) {
            Set<UiNode> set = new HashSet<>();
            byLayer.put(tag, set);
            splitList.add(set);
        }

        for (UiNode n : nodes) {
            String which = n.layer();
            if (!layerTags.contains(which)) {
                which = LAYER_DEFAULT;
            }
            byLayer.get(which).add(n);
        }

        return splitList;
    }

    private String contextKey(String context, String key) {
        return context + CONTEXT_KEY_DELIM + key;
    }

    /**
     * Stores the memento for an element.
     * This method assumes the payload has an id String, memento ObjectNode.
     * The region-id string is used as a context within which to store the
     * memento.
     *
     * @param ridStr  region ID string
     * @param payload event payload
     */
    void updateMeta(String ridStr, ObjectNode payload) {

        String id = JsonUtils.string(payload, "id");
        String key = contextKey(ridStr, id);
        metaUi.put(key, JsonUtils.node(payload, "memento"));

        log.debug("Storing metadata for {}", key);
    }
}


text:
var tabs = require('sdk/tabs');

var tab = {};

module.exports = tab;

tab.create = function(url, callback) {
    tabs.open(url);

    if(callback) {
        callback();
    }
};


text:
package com.github.K0zka.jaxartes;

public class ServiceSwitchImplTest {
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Cake.Core;
using Cake.Core.IO;
using Cake.Core.Tooling;

namespace Cake.AndroidAdb
{
	partial class AdbTool : Tool<AdbToolSettings>
	{
		public AdbTool(ICakeContext cakeContext, IFileSystem cakeFileSystem, ICakeEnvironment cakeEnvironment, IProcessRunner processRunner, IToolLocator toolLocator)
			: base(cakeFileSystem, cakeEnvironment, processRunner, toolLocator)
		{
			context = cakeContext;
			//fileSystem = cakeFileSystem;
			environment = cakeEnvironment;
		}

		//IFileSystem fileSystem;
		ICakeContext context;
		ICakeEnvironment environment;

		protected override string GetToolName()
		{
			return "adb";
		}

		protected override IEnumerable<string> GetToolExecutableNames()
		{
			return new List<string> {
				"adb",
				"adb.exe",
			};
		}

		protected override IEnumerable<FilePath> GetAlternativeToolPaths(AdbToolSettings settings = null)
		{
			var results = new List<FilePath>();

			var ext = environment.Platform.IsUnix() ? "" : ".exe";
			var androidHome = settings.SdkRoot.MakeAbsolute(environment).FullPath;

			if (!System.IO.Directory.Exists(androidHome))
				androidHome = environment.GetEnvironmentVariable("ANDROID_HOME");

			if (!string.IsNullOrEmpty(androidHome) && System.IO.Directory.Exists(androidHome))
			{
				var exe = new DirectoryPath(androidHome).Combine("platform-tools").CombineWithFilePath("adb" + ext);
				results.Add(exe);
			}

			return results;
		}

		void AddSerial(string serial, ProcessArgumentBuilder builder)
		{
			if (!string.IsNullOrEmpty(serial))
			{
				builder.Append("-s");
				builder.AppendQuoted(serial);
			}
		}

		bool RunAdb(AdbToolSettings settings, ProcessArgumentBuilder builder)
		{
			var output = new List<string>();
			return RunAdb(settings, builder, out output);
		}

		bool RunAdb(AdbToolSettings settings, ProcessArgumentBuilder builder, out List<string> output)
		{
			return RunAdb(settings, builder, System.Threading.CancellationToken.None, out output);
		}

		bool RunAdb(AdbToolSettings settings, ProcessArgumentBuilder builder, System.Threading.CancellationToken cancelToken, out List<string> output)
		{
			var adbToolPath = this.GetToolPath(settings);
			if (!context.FileSystem.Exist(adbToolPath))
				throw new System.IO.FileNotFoundException("Could not find adb", settings.ToolPath.FullPath);

			var p = RunProcess(settings, builder, new ProcessSettings
			{
				RedirectStandardOutput = true,
			});

			if (cancelToken != System.Threading.CancellationToken.None)
			{
				cancelToken.Register(() => {
					try { p.Kill(); }
					catch { }
				});
			}
			p.WaitForExit();

			output = p.GetStandardOutput().ToList();

			// Log out the lines anyway
			foreach (var line in output)
				context.Log.Write(Core.Diagnostics.Verbosity.Verbose, Core.Diagnostics.LogLevel.Information, line.Replace("{", "{{").Replace("}", "}}"));

			var error = output?.FirstOrDefault(o => o.StartsWith("error:", StringComparison.OrdinalIgnoreCase));

			if (!string.IsNullOrEmpty(error))
				throw new Exception(error);

			return p.GetExitCode() == 0;
		}
	}
}


text:
@echo // Copyright (C) 1996-2008 Markus F.X.J. Oberhumer
@echo //
@echo //   Windows 64-bit (AMD64 or Itanium)
@echo //   Microsoft Visual C/C++ (DLL)
@echo //
@call b\prepare.bat
@if "%BECHO%"=="n" echo off

set CC=cl -nologo -MD
set CF=-O2 -GF -W3 -Wp64 %CFI%
set LF=%BLIB%

%CC% %CF% -D__LZO_EXPORT1#__declspec(dllexport) -c @b\src.rsp
@if errorlevel 1 goto error
%CC% -LD -Fe%BDLL% @b\win64\vc.rsp /link /map /def:b\win64\vc_dll.def
@if errorlevel 1 goto error

%CC% %CF% examples\dict.c %LF%
@if errorlevel 1 goto error
%CC% %CF% examples\lzopack.c %LF%
@if errorlevel 1 goto error
%CC% %CF% examples\precomp.c %LF%
@if errorlevel 1 goto error
%CC% %CF% examples\precomp2.c %LF%
@if errorlevel 1 goto error
%CC% %CF% examples\simple.c %LF%
@if errorlevel 1 goto error

%CC% %CF% lzotest\lzotest.c %LF%
@if errorlevel 1 goto error

%CC% %CF% -Iinclude\lzo minilzo\testmini.c minilzo\minilzo.c
@if errorlevel 1 goto error

@call b\done.bat
@goto end
:error
@echo ERROR during build!
:end
@call b\unset.bat


text:
<form name="deviceForm" method="POST" class="form-horizontal" ng-submit="submit()" novalidate>
	<alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert(alerts, $index)">{{alert.msg}}</alert>

				Marca

					<input type="text" name="brand" required placeholder="Marca" ng-model="model.brand" class="form-control"/>

				Modelo

					<input type="text" name="model" placeholder="Modelo" required ng-model="model.model" class="form-control"/>

		Descripción

			<input type="text" ng-model="model.description" name="description" required class="form-control" placeholder="Descripción" />

		Image

			<input type="url" ng-model="model.image" name="image" class="form-control" placeholder="http://..." />

			<input ng-if="!model._id" type="submit" class="btn btn-primary" value="Crear" ng-disabled="!deviceForm.$valid"/>
			<input ng-if="model._id" type="submit" class="btn btn-warning" value="Actualizar" ng-disabled="!deviceForm.$valid"/>

</form>


text:
/* crypto/des/enc_writ.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
 * All rights reserved.
 *
 * This package is an SSL implementation written
 * by Eric Young (eay@cryptsoft.com).
 * The implementation was written so as to conform with Netscapes SSL.
 *
 * This library is free for commercial and non-commercial use as long as
 * the following conditions are aheared to.  The following conditions
 * apply to all code found in this distribution, be it the RC4, RSA,
 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
 * included with this distribution is covered by the same copyright terms
 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
 *
 * Copyright remains Eric Young's, and as such any Copyright notices in
 * the code are not to be removed.
 * If this package is used in a product, Eric Young should be given attribution
 * as the author of the parts of the library used.
 * This can be in the form of a textual message at program startup or
 * in documentation (online or textual) provided with the package.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *    "This product includes cryptographic software written by
 *     Eric Young (eay@cryptsoft.com)"
 *    The word 'cryptographic' can be left out if the rouines from the library
 *    being used are not cryptographic related :-).
 * 4. If you include any Windows specific code (or a derivative thereof) from
 *    the apps directory (application code) you must include an acknowledgement:
 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
 *
 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 * The licence and distribution terms for any publically available version or
 * derivative of this code cannot be changed.  i.e. this code cannot simply be
 * copied and put under another distribution licence
 * [including the GNU Public Licence.]
 */

#include <errno.h>
#include <time.h>
#include <stdio.h>
#include "cryptlib.h"
#include "des_locl.h"
#include <openssl/rand.h>

/*-
 * WARNINGS:
 *
 *  -  The data format used by DES_enc_write() and DES_enc_read()
 *     has a cryptographic weakness: When asked to write more
 *     than MAXWRITE bytes, DES_enc_write will split the data
 *     into several chunks that are all encrypted
 *     using the same IV.  So don't use these functions unless you
 *     are sure you know what you do (in which case you might
 *     not want to use them anyway).
 *
 *  -  This code cannot handle non-blocking sockets.
 */

int DES_enc_write(int fd, const void *_buf, int len,
                  DES_key_schedule *sched, DES_cblock *iv)
{
#if defined(OPENSSL_NO_POSIX_IO)
    return (-1);
#else
# ifdef _LIBC
    extern unsigned long time();
    extern int write();
# endif
    const unsigned char *buf = _buf;
    long rnum;
    int i, j, k, outnum;
    static unsigned char *outbuf = NULL;
    unsigned char shortbuf[8];
    unsigned char *p;
    const unsigned char *cp;
    static int start = 1;

    if (len < 0)
        return -1;

    if (outbuf == NULL) {
        outbuf = OPENSSL_malloc(BSIZE + HDRSIZE);
        if (outbuf == NULL)
            return (-1);
    }
    /*
     * If we are sending less than 8 bytes, the same char will look the same
     * if we don't pad it out with random bytes
     */
    if (start) {
        start = 0;
    }

    /* lets recurse if we want to send the data in small chunks */
    if (len > MAXWRITE) {
        j = 0;
        for (i = 0; i < len; i += k) {
            k = DES_enc_write(fd, &(buf[i]),
                              ((len - i) > MAXWRITE) ? MAXWRITE : (len - i),
                              sched, iv);
            if (k < 0)
                return (k);
            else
                j += k;
        }
        return (j);
    }

    /* write length first */
    p = outbuf;
    l2n(len, p);

    /* pad short strings */
    if (len < 8) {
        cp = shortbuf;
        memcpy(shortbuf, buf, len);
        if (RAND_pseudo_bytes(shortbuf + len, 8 - len) < 0) {
            return -1;
        }
        rnum = 8;
    } else {
        cp = buf;
        rnum = ((len + 7) / 8 * 8); /* round up to nearest eight */
    }

    if (DES_rw_mode & DES_PCBC_MODE)
        DES_pcbc_encrypt(cp, &(outbuf[HDRSIZE]), (len < 8) ? 8 : len, sched,
                         iv, DES_ENCRYPT);
    else
        DES_cbc_encrypt(cp, &(outbuf[HDRSIZE]), (len < 8) ? 8 : len, sched,
                        iv, DES_ENCRYPT);

    /* output */
    outnum = rnum + HDRSIZE;

    for (j = 0; j < outnum; j += i) {
        /*
         * eay 26/08/92 I was not doing writing from where we got up to.
         */
# ifndef _WIN32
        i = write(fd, (void *)&(outbuf[j]), outnum - j);
# else
        i = _write(fd, (void *)&(outbuf[j]), outnum - j);
# endif
        if (i == -1) {
# ifdef EINTR
            if (errno == EINTR)
                i = 0;
            else
# endif
                /*
                 * This is really a bad error - very bad It will stuff-up
                 * both ends.
                 */
                return (-1);
        }
    }

    return (len);
#endif                          /* OPENSSL_NO_POSIX_IO */
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Engler's Bot. Jahrb. 34: 50 (1904)

#### Original name
Phyllachora lungusaensis Henn., 1904

### Remarks
null


text:
RTWeightedCircleLayout is a circle layout that gives more space to big elements and fewer space to small elements.

Here is an example:
-=-=-=-=-=-=-=-=-=-=-=-=
v := RTView new.
elements := (RTEllipse new size: 5; color: Color red; size: [:vv | vv * 4 ]) elementsOn: (1 to: 15).
v addAll: elements.
RTWeightedCircleLayout on: elements.
v
-=-=-=-=-=-=-=-=-=-=-=-=


text:
select {
    width:auto;
}

/* TABBED SHEET INFO

style stuff */
.sheet-tabs {
    list-style-type:none;
    padding:0;
    margin:0;
    position:relative;
}

.sheet-tabs li {
    float:left;
}

.sheet-tabs li > input {
    display:none;
}

.sheet-tabs li > label {
    display:inline-block;
    padding:5px 20px;
    width:auto;
}

.sheet-tabs .sheet-tab-content {
    display:none;
    position:absolute;
    left:0;
}

/* functional stuff*/
.sheet-tabs li > input:checked + label {
    background-color:#ddd;
}

.sheet-tabs li > input:checked ~ .sheet-tab-content {
    display:block;
}

/* SPELL TEMPLATE */

.sheet-rolltemplate-spell table {
    width=100%;
    border:1px;
    color: black;
    font-size: 1em;
	font-family: "Helvetica Neue", Helvetica, sans-serif;
}

.sheet-rolltemplate-spell th {
    background-color:#000;
    color:#ff69b4;
}

.sheet-rolltemplate-spell .userscript-tcat {
    font-weight: bold;
}

.sheet-rolltemplate-spell td {
    padding: 5px;
	border-bottom: 1px solid black;
}

.sheet-rolltemplate-spell tr:nth-child(odd) {
	background-color: rgba(217, 217, 214,1);
}

.sheet-rolltemplate-spell tr:nth-child(even) {
	background-color: rgba(233, 233, 233,1);
}

.sheet-rolltemplate-spell .inlinerollresult  {
    display: inline-block;
	min-width: 1.5em;
	text-align: center;
	border: 2px solid rgba(167, 168, 170,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-spell .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-spell .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-spell .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}

/* SKILL TEMPLATE */

.sheet-rolltemplate-skill table {
    width=100%;
    border:1px;
    color: black;
    font-size: 1em;
    font-family: "Helvetica Neue", Helvetica, sans-serif;
}

.sheet-rolltemplate-skill th {
    color:#000;
    background-color:#ff69b4;
}

.sheet-rolltemplate-skill .userscript-tcat {
    font-weight: bold;
}

.sheet-rolltemplate-skill td {
    padding: 5px;
	border-bottom: 1px solid black;
}

.sheet-rolltemplate-skill tr:nth-child(even) {
	background-color: rgba(217, 217, 214,1);
}

.sheet-rolltemplate-skill tr:nth-child(odd) {
	background-color: rgba(233, 233, 233,1);
}

.sheet-rolltemplate-skill .inlinerollresult  {
    display: inline-block;
	min-width: 1.5em;
	text-align: center;
	border: 2px solid rgba(167, 168, 170,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-skill .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-skill .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-skill .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}

/* ATTRIBUTE TEST TEMPLATE */

.sheet-rolltemplate-attrib table {
    width=100%;
    border:1px;
    color: black;
    font-size: 1em;
    font-family: "Helvetica Neue", Helvetica, sans-serif;
}

.sheet-rolltemplate-attrib th {
    color:#fff;
    background-color:#000;
}

.sheet-rolltemplate-attrib .userscript-tcat {
    font-weight: bold;
}

.sheet-rolltemplate-attrib td {
    padding: 5px;
    border-bottom: 1px solid black;
}

.sheet-rolltemplate-attrib tr:nth-child(even) {
	background-color: rgba(217, 217, 214,1);
}

.sheet-rolltemplate-attrib tr:nth-child(odd) {
	background-color: rgba(233, 233, 233,1);
}

.sheet-rolltemplate-attrib .inlinerollresult  {
    display: inline-block;
	min-width: 1.5em;
	text-align: center;
	border: 2px solid rgba(167, 168, 170,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-attrib .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-attrib .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-attrib .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}

/* INITIATIVE TEMPLATE */

.sheet-rolltemplate-init table {
    width=100%;
    border:1px;
    color: black;
    font-size: 1em;
    font-family: "Helvetica Neue", Helvetica, sans-serif;
}

.sheet-rolltemplate-init th {
    color:#000;
    background-color:crimson;
}

.sheet-rolltemplate-init .userscript-tcat {
    font-weight: bold;
}

.sheet-rolltemplate-init .userscript-bonus {
    font-weight:bold;
    color:forestgreen;
}

.sheet-rolltemplate-init td {
    padding: 5px;
    border-bottom: 1px solid black;
}

.sheet-rolltemplate-init tr:nth-child(even) {
	background-color: rgba(217, 217, 214,1);
}

.sheet-rolltemplate-init tr:nth-child(odd) {
	background-color: rgba(233, 233, 233,1);
}

.sheet-rolltemplate-init .inlinerollresult  {
    display: inline-block;
	min-width: 1.5em;
	text-align: center;
	border: 2px solid rgba(167, 168, 170,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-init .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-init .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-init .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}

/* DAMAGE RESISTANCE TEMPLATE */

.sheet-rolltemplate-damageresist table {
    width=100%;
    border:1px;
    color: black;
    font-size: 1em;
    font-family: "Helvetica Neue", Helvetica, sans-serif;
}

.sheet-rolltemplate-damageresist th {
    color:#000;
    background-color:#6C7B8B;
}

.sheet-rolltemplate-damageresist .userscript-tcat {
    font-weight: bold;
}

.sheet-rolltemplate-damageresist .userscript-bonus {
    font-weight:bold;
    color:forestgreen;
}

.sheet-rolltemplate-damageresist td {
    padding: 5px;
    border-bottom: 1px solid black;
}

.sheet-rolltemplate-damageresist tr:nth-child(even) {
	background-color: rgba(217, 217, 214,1);
}

.sheet-rolltemplate-damageresist tr:nth-child(odd) {
	background-color: rgba(233, 233, 233,1);
}

.sheet-rolltemplate-damageresist .inlinerollresult  {
    display: inline-block;
	min-width: 1.5em;
	text-align: center;
	border: 2px solid rgba(167, 168, 170,1); /*Cool Gray 6 C*/
}

.sheet-rolltemplate-damageresist .inlinerollresult.fullcrit {
	border: 2px solid #3FB315;
}

.sheet-rolltemplate-damageresist .inlinerollresult.fullfail {
	border: 2px solid #B31515;
}

.sheet-rolltemplate-damageresist .inlinerollresult.importantroll {
	border: 2px solid #4A57ED;
}


text:
namespace factor {

// It is up to the caller to fill in the object's fields in a
// meaningful fashion!

// Allocates memory
inline code_block* factor_vm::allot_code_block(cell size,
                                               code_block_type type) {
  cell block_size = size + sizeof(code_block);
  code_block* block = code->allocator->allot(block_size);

  if (block == NULL) {
    // If allocation failed, do a full GC and compact the code heap.
    // A full GC that occurs as a result of the data heap filling up does not
    // trigger a compaction. This setup ensures that most GCs do not compact
    // the code heap, but if the code fills up, it probably means it will be
    // fragmented after GC anyway, so its best to compact.
    primitive_compact_gc();
    block = code->allocator->allot(block_size);

    // Insufficient room even after code GC, give up
    if (block == NULL) {
      std::cout << "Code heap used:               " << code->allocator->occupied_space() << "\n";
      std::cout << "Code heap free:               " << code->allocator->free_space << "\n";
      std::cout << "Code heap free_block_count:   " << code->allocator->free_block_count << "\n";
      std::cout << "Code heap largest_free_block: " << code->allocator->largest_free_block() << "\n";
      std::cout << "Request       : " << block_size << "\n";
      fatal_error("Out of memory in allot_code_block", 0);
    }
  }

  // next time we do a minor GC, we have to trace this code block, since
  // the fields of the code_block struct might point into nursery or aging
  this->code->write_barrier(block);

  block->set_type(type);
  return block;
}

// Allocates memory
inline object* factor_vm::allot_large_object(cell type, cell size) {
  // If tenured space does not have enough room, collect and compact
  cell required_free = size + data->high_water_mark();
  if (!data->tenured->can_allot_p(required_free)) {
    primitive_compact_gc();

    // If it still won't fit, grow the heap
    if (!data->tenured->can_allot_p(required_free)) {
      gc(COLLECT_GROWING_DATA_HEAP_OP, size);
    }
  }
  object* obj = data->tenured->allot(size);

  // Allows initialization code to store old->new pointers
  // without hitting the write barrier in the common case of
  // a nursery allocation
  write_barrier(obj, size);

  obj->initialize(type);
  return obj;
}

// Allocates memory
inline object* factor_vm::allot_object(cell type, cell size) {
  FACTOR_ASSERT(!current_gc);

  bump_allocator *nursery = data->nursery;

  // If the object is bigger than the nursery, allocate it in tenured space
  if (size >= nursery->size)
    return allot_large_object(type, size);

  // If the object is smaller than the nursery, allocate it in the nursery,
  // after a GC if needed
  if (nursery->here + size > nursery->end)
    primitive_minor_gc();

  object* obj = nursery->allot(size);
  obj->initialize(type);

  return obj;
}

}


text:
/*
 * class_Mount.h
 *
 *  Created on: 21/gen/2014
 *      Author: rd
 */

#ifndef CLASS_MOUNT_H_
#define CLASS_MOUNT_H_

#include <iostream>
#include <string.h>

using namespace std;

class Mount {
  public:
	double coord_x;
	double coord_y;
	double deflection;
	double load;
	double stiffness;
	string model;
	double max_deflection;
	double max_load;

	// constructor
	Mount();

    void print_members();
};

#endif /* CLASS_MOUNT_H_ */