text:
package org.apache.giraph.comm;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.giraph.bsp.CentralizedServiceWorker;
import org.apache.giraph.comm.aggregators.AllAggregatorServerData;
import org.apache.giraph.comm.aggregators.OwnerAggregatorServerData;
import org.apache.giraph.comm.messages.MessageStore;
import org.apache.giraph.comm.messages.MessageStoreFactory;
import org.apache.giraph.comm.messages.queue.AsyncMessageStoreWrapper;
import org.apache.giraph.conf.GiraphConstants;
import org.apache.giraph.conf.ImmutableClassesGiraphConfiguration;
import org.apache.giraph.edge.EdgeStore;
import org.apache.giraph.edge.EdgeStoreFactory;
import org.apache.giraph.graph.VertexMutations;
import org.apache.giraph.partition.DiskBackedPartitionStore;
import org.apache.giraph.partition.PartitionStore;
import org.apache.giraph.partition.SimplePartitionStore;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.mapreduce.Mapper;

/**
 * Anything that the server stores
 *
 * @param <I> Vertex id
 * @param <V> Vertex data
 * @param <E> Edge data
 */
@SuppressWarnings("rawtypes")
public class ServerData<I extends WritableComparable,
    V extends Writable, E extends Writable> {
  /** Configuration */
  private final ImmutableClassesGiraphConfiguration<I, V, E> conf;
  /** Partition store for this worker. */
  private volatile PartitionStore<I, V, E> partitionStore;
  /** Edge store for this worker. */
  private final EdgeStore<I, V, E> edgeStore;
  /** Message store factory */
  private final MessageStoreFactory<I, Writable, MessageStore<I, Writable>>
  messageStoreFactory;
  /**
   * Message store for incoming messages (messages which will be consumed
   * in the next super step)
   */
  private volatile MessageStore<I, Writable> incomingMessageStore;
  /**
   * Message store for current messages (messages which we received in
   * previous super step and which will be consumed in current super step)
   */
  private volatile MessageStore<I, Writable> currentMessageStore;

  private volatile MessageStore<I, Writable> remoteMessageStore;
    private volatile MessageStore<I, Writable> localMessageStore;
  /**
   * Map of partition ids to incoming vertex mutations from other workers.
   * (Synchronized access to values)
   */
  private final ConcurrentHashMap<I, VertexMutations<I, V, E>>
  vertexMutations = new ConcurrentHashMap<I, VertexMutations<I, V, E>>();
  /**
   * Holds aggregtors which current worker owns from current superstep
   */
  private final OwnerAggregatorServerData ownerAggregatorData;
  /**
   * Holds old aggregators from previous superstep
   */
  private final AllAggregatorServerData allAggregatorData;
  /** Service worker */
  private final CentralizedServiceWorker<I, V, E> serviceWorker;

  /** Store for current messages from other workers to this worker */
  private volatile List<Writable> currentWorkerToWorkerMessages =
      Collections.synchronizedList(new ArrayList<Writable>());
  /** Store for message from other workers to this worker for next superstep */
  private volatile List<Writable> incomingWorkerToWorkerMessages =
      Collections.synchronizedList(new ArrayList<Writable>());

  /**
   * Constructor.
   *
   * @param service Service worker
   * @param conf Configuration
   * @param messageStoreFactory Factory for message stores
   * @param context Mapper context
   */
  public ServerData(
      CentralizedServiceWorker<I, V, E> service,
      ImmutableClassesGiraphConfiguration<I, V, E> conf,
      MessageStoreFactory<I, Writable, MessageStore<I, Writable>>
          messageStoreFactory,
      Mapper<?, ?, ?, ?>.Context context) {
    this.serviceWorker = service;
    this.conf = conf;
    this.messageStoreFactory = messageStoreFactory;
    if (GiraphConstants.USE_OUT_OF_CORE_GRAPH.get(conf)) {
      partitionStore =
          new DiskBackedPartitionStore<I, V, E>(conf, context,
              getServiceWorker());
    } else {
      partitionStore =
          new SimplePartitionStore<I, V, E>(conf, context);
    }
    EdgeStoreFactory<I, V, E> edgeStoreFactory = conf.createEdgeStoreFactory();
    edgeStoreFactory.initialize(service, conf, context);
    edgeStore = edgeStoreFactory.newStore();
    ownerAggregatorData = new OwnerAggregatorServerData(context);
    allAggregatorData = new AllAggregatorServerData(context, conf);
  }

  public EdgeStore<I, V, E> getEdgeStore() {
    return edgeStore;
  }

  /**
   * Return the partition store for this worker.
   *
   * @return The partition store
   */
  public PartitionStore<I, V, E> getPartitionStore() {
    return partitionStore;
  }

  /**
  /**
   * Get message store for incoming messages (messages which will be consumed
   * in the next super step)
   *
   * @param <M> Message data
   * @return Incoming message store
   */
  public <M extends Writable> MessageStore<I, M> getIncomingMessageStore() {
    return (MessageStore<I, M>) incomingMessageStore;
  }
    public <M extends Writable> MessageStore<I, M> getRemoteMessageStore() {
        return (MessageStore<I, M>) remoteMessageStore;
    }
  public <M extends Writable> MessageStore<I, M> getLocalMessageStore() {
    return (MessageStore<I, M>) localMessageStore;
  }
  /**
   * Get message store for current messages (messages which we received in
   * previous super step and which will be consumed in current super step)
   *
   * @param <M> Message data
   * @return Current message store
   */
  public <M extends Writable> MessageStore<I, M> getCurrentMessageStore() {
    return (MessageStore<I, M>) currentMessageStore;
  }

  /**
   * Re-initialize message stores.
   * Discards old values if any.
   * @throws IOException
   */
  public void resetMessageStores() throws IOException {
    if (currentMessageStore != null) {
      currentMessageStore.clearAll();
      currentMessageStore = null;
    }
    if (incomingMessageStore != null) {
      incomingMessageStore.clearAll();
      incomingMessageStore = null;
    }
    if (remoteMessageStore != null) {
      remoteMessageStore.clearAll();
      remoteMessageStore = null;
    }
    prepareSuperstep();
  }

  /** Prepare for next super step */
  public void prepareSuperstep() {

   if(currentMessageStore!=null){
       log.info("currentmessagestore"+currentMessageStore.)
   }
      if (currentMessageStore != null) {
          try {
              currentMessageStore.clearAll();
          } catch (IOException e) {
              throw new IllegalStateException(
                      "Failed to clear previous message store");
          }
      }
      currentMessageStore =
              incomingMessageStore != null ? incomingMessageStore :
                      messageStoreFactory.newStore(conf.getIncomingMessageValueFactory());
      incomingMessageStore =
              messageStoreFactory.newStore(conf.getOutgoingMessageValueFactory());
      // finalize current message-store before resolving mutations
      currentMessageStore.finalizeStore();

      currentWorkerToWorkerMessages = incomingWorkerToWorkerMessages;
      incomingWorkerToWorkerMessages =
              Collections.synchronizedList(new ArrayList<Writable>());

      if (remoteMessageStore == null) {
          remoteMessageStore =
                  messageStoreFactory.newStore(conf.getIncomingMessageValueFactory());
      }
      if (localMessageStore == null) {
          localMessageStore =
                  messageStoreFactory.newStore(conf.getIncomingMessageValueFactory());
      }

  }

  /**
   * In case of async message store we have to wait for all messages
   * to be processed before going into next superstep.
   */
  public void waitForComplete() {
    if (incomingMessageStore instanceof AsyncMessageStoreWrapper) {
      ((AsyncMessageStoreWrapper) incomingMessageStore).waitToComplete();

    }
  }

  /**
   * Get the vertex mutations (synchronize on the values)
   *
   * @return Vertex mutations
   */
  public ConcurrentHashMap<I, VertexMutations<I, V, E>>
  getVertexMutations() {
    return vertexMutations;
  }

  /**
   * Get holder for aggregators which current worker owns
   *
   * @return Holder for aggregators which current worker owns
   */
  public OwnerAggregatorServerData getOwnerAggregatorData() {
    return ownerAggregatorData;
  }

  /**
   * Get holder for aggregators from previous superstep
   *
   * @return Holder for aggregators from previous superstep
   */
  public AllAggregatorServerData getAllAggregatorData() {
    return allAggregatorData;
  }

  /**
   * Get the reference of the service worker.
   *
   * @return CentralizedServiceWorker
   */
  public CentralizedServiceWorker<I, V, E> getServiceWorker() {
    return this.serviceWorker;
  }

  /**
   * Get and clear worker to worker messages for this superstep. Can be
   * called only once per superstep.
   *
   * @return List of messages for this worker
   */
  public List<Writable> getAndClearCurrentWorkerToWorkerMessages() {
    List<Writable> ret = currentWorkerToWorkerMessages;
    currentWorkerToWorkerMessages = null;
    return ret;
  }

  /**
   * Add incoming message to this worker for next superstep. Thread-safe.
   *
   * @param message Message received
   */
  public void addIncomingWorkerToWorkerMessage(Writable message) {
    incomingWorkerToWorkerMessages.add(message);
  }

  /**
   * Get worker to worker messages received in previous superstep.
   * @return list of current worker to worker messages.
   */
  public List<Writable> getCurrentWorkerToWorkerMessages() {
    return currentWorkerToWorkerMessages;
  }

}


text:
<?php

namespace Dlinkgc\Crawler;

class FilejungleCrawler extends Crawler
{
    public function execute()
    {
        $dc = $this->getResponseDomCrawler();

        $node = $dc->filter('#file_name');

        if (count($node) !== 1)
            return false;

        return true;
    }
}

redpajama_set_name: RedPajamaGithub


text:
import React from 'react';
import '../styles/Contact.css';
import github from '../images/github.svg'
import linkedIn from '../images/linkedIn.svg'
import twitter from '../images/twitter.svg'
import instagram from '../images/instagram.svg'

class Contact extends React.Component {
  constructor(){
    super();
    this.state = {
      name: '',
      email: '',
      message: ''
    };
  }

  nameField(e) {
    this.setState({name: e.target.value});
  }

  emailField(e) {
    this.setState({email: e.target.value});
  }

  messageField(e) {
    this.setState({message: e.target.value});
  }

  enableSubmit() {
    if (this.state.name === '' ||
        this.state.email.indexOf('@') === -1 ||
        this.state.message === '') {
      return true;
    }
  }

  render() {
    return (

Get In Touch

You can reach me at:

LinkedIn

Github

Twitter

Instagram

            <form
              action="https://formspree.io/bcgodfrey91@gmail.com"
              method="POST"
              className='contact-form'
            >
              <input
                onKeyUp={(e)=>this.nameField(e)}
                className='form-input name'
                placeholder='Name'
                type="text"
                name="name"
              />
              <input
                onKeyUp={(e)=>this.emailField(e)}
                className='form-input email'
                placeholder='Email'
                type="email" name="_replyto"
              />
              <textarea
                onKeyUp={(e)=>this.messageField(e)}
                className='form-message'
                placeholder={`What's Up?`}
                type='text'
                name="message"
              >
              </textarea>
              <input
                className="form-button submit"
                type="submit"
                value="Send"
                disabled={this.enableSubmit()}
              />
            </form>

    )
  }
}

export default Contact;


text:
Convert HSL colors to RGB colors in hex format.

## API

```
require('hsl-to-hex') => Function
hsl(hue, saturation, luminosity)` => String
```

## Example

```js
var hsl = require('hsl-to-hex')
var hue = 133 hsl(133, 40, 60)
var saturation = 40
var luminosity = 60
var hex = hsl(hue, saturation, luminosity)
console.log(hex) // #70c282
```

## License

ISC


text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Ads.GoogleAds.V11.Errors {

  /// Holder for reflection information generated from google/ads/googleads/v11/errors/payments_account_error.proto
  public static partial class PaymentsAccountErrorReflection {

    #region Descriptor
    /// File descriptor for google/ads/googleads/v11/errors/payments_account_error.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static PaymentsAccountErrorReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Cjxnb29nbGUvYWRzL2dvb2dsZWFkcy92MTEvZXJyb3JzL3BheW1lbnRzX2Fj",
            "Y291bnRfZXJyb3IucHJvdG8SH2dvb2dsZS5hZHMuZ29vZ2xlYWRzLnYxMS5l",
            "cnJvcnMieAoYUGF5bWVudHNBY2NvdW50RXJyb3JFbnVtIlwKFFBheW1lbnRz",
            "QWNjb3VudEVycm9yEg8KC1VOU1BFQ0lGSUVEEAASCwoHVU5LTk9XThABEiYK",
            "Ik5PVF9TVVBQT1JURURfRk9SX01BTkFHRVJfQ1VTVE9NRVIQAkL5AQojY29t",
            "Lmdvb2dsZS5hZHMuZ29vZ2xlYWRzLnYxMS5lcnJvcnNCGVBheW1lbnRzQWNj",
            "b3VudEVycm9yUHJvdG9QAVpFZ29vZ2xlLmdvbGFuZy5vcmcvZ2VucHJvdG8v",
            "Z29vZ2xlYXBpcy9hZHMvZ29vZ2xlYWRzL3YxMS9lcnJvcnM7ZXJyb3JzogID",
            "R0FBqgIfR29vZ2xlLkFkcy5Hb29nbGVBZHMuVjExLkVycm9yc8oCH0dvb2ds",
            "ZVxBZHNcR29vZ2xlQWRzXFYxMVxFcnJvcnPqAiNHb29nbGU6OkFkczo6R29v",
            "Z2xlQWRzOjpWMTE6OkVycm9yc2IGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Ads.GoogleAds.V11.Errors.PaymentsAccountErrorEnum), global::Google.Ads.GoogleAds.V11.Errors.PaymentsAccountErrorEnum.Parser, null, null, new[]{ typeof(global::Google.Ads.GoogleAds.V11.Errors.PaymentsAccountErrorEnum.Types.PaymentsAccountError) }, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// Container for enum describing possible errors in payments account service.
  ///
  public sealed partial class PaymentsAccountErrorEnum : pb::IMessage<PaymentsAccountErrorEnum>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<PaymentsAccountErrorEnum> _parser = new pb::MessageParser<PaymentsAccountErrorEnum>(() => new PaymentsAccountErrorEnum());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<PaymentsAccountErrorEnum> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Ads.GoogleAds.V11.Errors.PaymentsAccountErrorReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public PaymentsAccountErrorEnum() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public PaymentsAccountErrorEnum(PaymentsAccountErrorEnum other) : this() {
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public PaymentsAccountErrorEnum Clone() {
      return new PaymentsAccountErrorEnum(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as PaymentsAccountErrorEnum);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(PaymentsAccountErrorEnum other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(PaymentsAccountErrorEnum other) {
      if (other == null) {
        return;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
        }
      }
    }
    #endif

    #region Nested types
    /// Container for nested types declared in the PaymentsAccountErrorEnum message type.
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static partial class Types {
      ///
      /// Enum describing possible errors in payments account service.
      ///
      public enum PaymentsAccountError {
        ///
        /// Enum unspecified.
        ///
        [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
        ///
        /// The received error code is not known in this version.
        ///
        [pbr::OriginalName("UNKNOWN")] Unknown = 1,
        ///
        /// Manager customers are not supported for payments account service.
        ///
        [pbr::OriginalName("NOT_SUPPORTED_FOR_MANAGER_CUSTOMER")] NotSupportedForManagerCustomer = 2,
      }

    }
    #endregion

  }

  #endregion

}

#endregion Designer generated code


text:
ACCEPTED

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

#### Published in
Nova Hedwigia 59(1-2): 268 (1994)

#### Original name
Corynesporina elegans Subram., 1994

### Remarks
null


text:
<!DOCTYPE html>

        <meta charset="utf-8"/>
        <?php
//        $cs = Yii::app()->clientScript;
//        $cs->scriptMap = array(
//            'jquery.js' => h::livePath() . '/protected/modules/user/views/asset/global/plugins/jquery.min.js',
//                //'jquery.js' => false,
//        );
        ?>
        <title><?php echo isset($this->pageTitle) ? $this->pageTitle : Yii::app()->name; ?></title>

        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1.0" name="viewport"/>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <meta content="" name="description"/>
        <meta content="" name="author"/>

        <base href="<?php echo h::livePath(); ?>/resources/">

        <link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css">
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css">
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css">
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css"/>

        <link rel="stylesheet" type="text/css" href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/select2/select2.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap-datepicker/css/datepicker.css"/>

        <?php if (Yii::app()->controller->id == 'contentfp' || Yii::app()->controller->id == 'slider' || Yii::app()->controller->id == 'postcategory' ||  Yii::app()->controller->id == 'post') { ?>
            <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/jquery-file-upload/blueimp-gallery/blueimp-gallery.min.css" rel="stylesheet"/>
            <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/jquery-file-upload/css/jquery.fileupload.css" rel="stylesheet"/>
            <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/jquery-file-upload/css/jquery.fileupload-ui.css" rel="stylesheet"/>
            <?php if (Yii::app()->controller->id == 'upload' ){ ?>
            <link rel="stylesheet" type="text/css" href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap-fileupload/bootstrap-fileupload.css" />
        <?php } }?>

        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css" rel="stylesheet" type="text/css"/>
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap-modal/css/bootstrap-modal.css" rel="stylesheet" type="text/css"/>

        <link rel="stylesheet" type="text/css" href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/jquery-notific8/jquery.notific8.min.css"/>

        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/css/components.css" id="style_components" rel="stylesheet" type="text/css"/>
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/css/plugins.css" rel="stylesheet" type="text/css"/>
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/admin/layout2/css/layout.css" rel="stylesheet" type="text/css"/>
        <link id="style_color" href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/admin/layout2/css/themes/grey.css" rel="stylesheet" type="text/css"/>
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/admin/layout2/css/custom.css" rel="stylesheet" type="text/css"/>

        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/global/plugins/bootstrap-gtreetable/bootstrap-gtreetable.min.css" rel="stylesheet" type="text/css"/>

        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/custom/css/custom.css" rel="stylesheet" type="text/css"/>
        <link href="<?php echo h::livePath() ?>/protected/modules/user/views/asset/custom/css/CSS_checkbox_full/style.css" rel="stylesheet" type="text/css"/>

        <link rel="shortcut icon" href="favicon.ico"/>

                                        <?php echo Yii::app()->user->username; ?>

                                        <a href="<?php echo h::livePath() ?>/user/logout">
                                             Log Out

                        <li class=" start <?php echo (Yii::app()->controller->id == 'dashboard' ) ? "active" : ""; ?>">
                            <a href="<?php echo h::livePath(); ?>/app/dashboard/admin">

                                <?php echo h::t('admin', 'Dashboard'); ?>

                        <li class="<?php echo Yii::app()->user->checkAccess('admin') ? "" : "hide"; ?> start <?php echo (Yii::app()->controller->id == 'admin' ) ? "active" : ""; ?>">

                                <?php echo h::t('admin', 'Utilizatori'); ?>

                                    <a href="<?php echo h::livePath(); ?>/user/admin/admin">
                                        <?php echo h::t('admin', 'Listare utilizatori admin'); ?>

                                    <a href="<?php echo h::livePath(); ?>/user/admin/admins">
                                        <?php echo h::t('admin', 'Listare utilizatori site'); ?>

                        <li class="start <?php echo (Yii::app()->controller->id == 'slider' || Yii::app()->controller->id == 'contentfp' ) ? "active" : ""; ?>">

                                <?php echo h::t('admin', 'Setari front'); ?>

                                    <a href="<?php echo h::livePath(); ?>/app/slider/admin">
                                        <?php echo h::t('admin', 'Slider'); ?>

                                    <a href="<?php echo h::livePath(); ?>/app/contentfp/admin">
                                        <?php echo h::t('admin', 'Casete prima pagina'); ?>

                        <li class="start <?php echo (Yii::app()->controller->id == 'postcategory' || Yii::app()->controller->id == 'post' || Yii::app()->controller->id == 'comment' ) ? "active" : ""; ?>">

                                <?php echo h::t('admin', 'Blog'); ?>

                                    <a href="<?php echo h::livePath(); ?>/app/postcategory/admin">
                                        <?php echo h::t('admin', 'Categorii'); ?>

                                    <a href="<?php echo h::livePath(); ?>/app/post/admin">
                                        <?php echo h::t('admin', 'Postari'); ?>

                                    <a href="<?php echo h::livePath(); ?>/app/comment/admin">
                                        <?php echo h::t('admin', 'Comentarii'); ?>

                        <li class=" start <?php echo (Yii::app()->controller->id == 'etemplete' ) ? "active" : ""; ?>">
                            <a href="<?php echo h::livePath(); ?>/app/etemplete/admin">

                                <?php echo h::t('admin', 'Email template'); ?>

                        <li class=" start <?php echo (Yii::app()->controller->id == 'constanta' ) ? "active" : ""; ?>">
                            <a href="<?php echo h::livePath(); ?>/app/constanta/admin">

                                <?php echo h::t('admin', 'Constanta'); ?>

                        <li class=" start <?php echo (Yii::app()->controller->id == 'newsletter' ) ? "active" : ""; ?>">
                            <a href="<?php echo h::livePath(); ?>/app/newsletter/admin">

                                <?php echo h::t('admin', 'Newsletter'); ?>

                        <li class=" start <?php echo (Yii::app()->controller->id == 'contactform' ) ? "active" : ""; ?>">
                            <a href="<?php echo h::livePath(); ?>/app/contactform/admin">

                                <?php echo h::t('admin', 'Formulare contact'); ?>

                    <?php echo $content; ?>

                <?php echo date("Y"); ?> © <?php echo ucfirst(Yii::app()->name); ?>

        <?php if (Yii::app()->controller->id == 'contentfp' || Yii::app()->controller->id == 'slider' || Yii::app()->controller->id == 'postcategory' || Yii::app()->controller->id == 'post'  ) { ?>

            <?php if (Yii::app()->controller->id == 'contentfp') { ?>

            <?php } ?>

            <?php if (Yii::app()->controller->id == 'slider') { ?>

            <?php } ?>
            <?php if (Yii::app()->controller->id == 'postcategory') { ?>

        <?php } ?>
        <?php if (Yii::app()->controller->id == 'post') { ?>

        <?php } ?>

        <?php } ?>

        <?php if (Yii::app()->controller->id == 'contentfp' ||  Yii::app()->controller->id == 'slider' ||  Yii::app()->controller->id == 'postcategory' ||  Yii::app()->controller->id == 'post' ) { ?>

            <?php if (Yii::app()->controller->id == 'upload') { ?>

        <?php }} ?>

        <?php require_once Yii::app()->basePath . '/modules/user/views/asset/custom/js/js.php'; ?>


text:
package com.github.czgov.isds.internal;

import org.apache.camel.Exchange;
import org.apache.camel.util.ObjectHelper;

import com.github.czgov.isds.Constants;
import com.github.czgov.isds.ISDSEndpoint;
import com.github.czgov.isds.ISDSProducer;

import java.util.Date;

import cz.abclinuxu.datoveschranky.common.FileAttachmentStorer;
import cz.abclinuxu.datoveschranky.common.entities.MessageEnvelope;
import cz.abclinuxu.datoveschranky.common.entities.MessageType;

/**
 * Created by jludvice on 19.7.17.
 */
public class ISDSDownloadProducer extends ISDSProducer {
    public ISDSDownloadProducer(ISDSEndpoint endpoint) {
        super(endpoint);
    }

    @Override
    public void process(Exchange exchange) throws Exception {

        final String id = exchange.getIn().getHeader(Constants.MSG_ID, String.class);
        final MessageType type = exchange.getIn().getHeader(Constants.MSG_TYPE, "received", MessageType.class);

        ObjectHelper.notNull(id, "Camel header " + Constants.MSG_ID);

        System.out.printf("fetching %s message #%s\n", type, id);

        MessageEnvelope env = new MessageEnvelope();
        env.setMessageID(id);
        env.setType(type);

        if (MessageType.RECEIVED.equals(type) && endpoint.isDownloadListMessages()) {
            // hack around isds policy which doesn't allow downloading of messages
            // which arrived before user logged in (or called getListOfReceivedMessages API method
            Date d = new Date();
            log.info("Calling getListOfReceivedMessages before downloading message by id {}", id);
            // don't care about result, just need ISDS to mark messages as delivered
            endpoint.getDataBoxManager()
                    .getDataBoxMessagesService()
                    .getListOfReceivedMessages(d, d, null, 1, 1);
        }

        if (MessageType.SENT.equals(type) || endpoint.isZfo()) {
            ISDSMessagesConsumer.downloadZFO(exchange, env, endpoint);
        } else {
            ISDSMessagesConsumer.downloadMessage(exchange, env, endpoint,
                    new FileAttachmentStorer(endpoint.getAttachmentStore().toFile()));
        }
        log.info("probably need TODO :)");
    }
}


text:
<?php

namespace Isabry\Gatekeeper\Controllers;

use Auth;
use View;
use Debugbar;
use URL;
use Input;
use Session;
use Redirect;
use Request;
use Hash;
use Isabry\Gatekeeper\Models\User;

class UsersController extends Controller {

	/**
	 * Create a new controller instance.
	 *
	 * @return void
	 */
	public function __construct()
	{
		$this->middleware('auth');
		// $this->middleware('roles');
	}

	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
	public function index()
	{
		// $users = User::where('enable', 1)->with('groups')->paginate(10);
		$users = User::with('groups')->paginate(10);
		Debugbar::info("Users");
		Debugbar::info($users->toArray());

		return View::make('gatekeeper::users.index')
						->with('title', 'User List')
						->with('users', $users);
	}

	/**
	 * Show the form for creating a new resource.
	 *
	 * @return Response
	 */
	public function create()
	{

	}

	/**
	 * Store a newly created resource in storage.
	 *
	 * @return Response
	 */
	public function store()
	{
		//
	}

	/**
	 * Display the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function show($id)
	{
		try {
			$user = User::with('groups')->findOrFail($id);
			Debugbar::info($user->toArray());

			$user_form = \FormBuilder::create('Isabry\Gatekeeper\Forms\UserForm', [
				// 'method' => 'PUT',
				// 'url' => route('users.store'),
				'model' => $user
			])
			->remove('password')
			->remove('password_confirmation');

			$url =  '' .
					'   Back to Users List' .
					'';

			return view('gatekeeper::users.view')
					->with('title', 'User ('.$user->name.')')
					->with(compact('user_form'))
					->with('url', $url);

		} catch (ModelNotFoundException $e) {
			Session::flash('error', 'User not found (id: ' . $id . ')');
			return Redirect::intended('users');
		}
	}

	/**
	 * Show the form for editing the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function edit($id)
	{
		//
	}

	/**
	 * Update the specified resource in storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function update($id)
	{
		//
	}

	/**
	 * Update the specified resource in storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function enable($id)
	{
		$page = Input::get("page", 1);

		try {
			$user = User::findOrFail($id);
			$user->enable = 1 - Input::get('enable');
			$user->save();

			// Session::flash('info', 'Enable/Disable: (GET)
'.print_r($_GET, true).'
');
			Session::flash('success', 'The user '.$user->name.' was updated successfuly');

			return Redirect::intended('users?page='.$page);
		} catch (HTTPException $e) {
			Session::flash('error', 'User not found (id: ' . $id . ')');
			return Redirect::intended('users?page='.$page);
		}
	}

	/**
	 * Remove the specified resource from storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function destroy($id)
	{
		//
	}

}


text:
package org.zstack.test.compute.vm;

import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import org.zstack.compute.host.HostGlobalConfig;
import org.zstack.core.cloudbus.CloudBus;
import org.zstack.core.cloudbus.EventCallback;
import org.zstack.core.cloudbus.EventFacade;
import org.zstack.core.componentloader.ComponentLoader;
import org.zstack.core.config.GlobalConfigFacade;
import org.zstack.core.db.DatabaseFacade;
import org.zstack.core.db.SimpleQuery;
import org.zstack.core.db.SimpleQuery.Op;
import org.zstack.header.allocator.HostCapacityVO;
import org.zstack.header.host.HostStatus;
import org.zstack.header.host.HostVO;
import org.zstack.header.host.RecalculateHostCapacityMsg;
import org.zstack.header.message.AbstractBeforeDeliveryMessageInterceptor;
import org.zstack.header.message.Message;
import org.zstack.header.vm.VmInstanceState;
import org.zstack.header.vm.VmInstanceVO;
import org.zstack.header.vm.VmInstanceVO_;
import org.zstack.header.vm.VmTracerCanonicalEvents;
import org.zstack.simulator.SimulatorController;
import org.zstack.test.Api;
import org.zstack.test.ApiSenderException;
import org.zstack.test.DBUtil;
import org.zstack.test.deployer.Deployer;

import java.util.Map;
import java.util.concurrent.TimeUnit;

/**
 * 1. create a vm
 * 2. disable host auto-reconnect
 * 3. make the host disconnected
 *

 * confirm the vm becomes Unknown
 * confirm the host capacity not changed
 * confirm VmStateChangedOnHostData issued
 *

 * 4. reconnect the host
 *

 * confirm the vm becomes running
 * confirm VmStateChangedOnHostData issued
 * confirm the RecalculateHostCapacityMsg message sent
 */
public class TestVmStateTracer1 {
    Deployer deployer;
    Api api;
    ComponentLoader loader;
    CloudBus bus;
    DatabaseFacade dbf;
    GlobalConfigFacade gcf;
    SimulatorController sctrl;
    EventFacade evtf;
    boolean success1 = false;
    boolean success2 = false;
    boolean success3 = false;

    @Before
    public void setUp() throws Exception {
        DBUtil.reDeployDB();
        deployer = new Deployer("deployerXml/vm/TestVmStateTracer.xml");
        loader = deployer.getComponentLoader();
        gcf = loader.getComponent(GlobalConfigFacade.class);
        sctrl = loader.getComponent(SimulatorController.class);
        HostGlobalConfig.PING_HOST_INTERVAL.updateValue(1);
        bus = loader.getComponent(CloudBus.class);
        dbf = loader.getComponent(DatabaseFacade.class);
        evtf = loader.getComponent(EventFacade.class);

        deployer.build();
        api = deployer.getApi();
    }

    @Test
    public void test() throws InterruptedException, ApiSenderException {
        HostGlobalConfig.AUTO_RECONNECT_ON_ERROR.updateValue(false);
        SimpleQuery<VmInstanceVO> q = dbf.createQuery(VmInstanceVO.class);
        q.add(VmInstanceVO_.name, Op.EQ, "TestVm1");
        VmInstanceVO vm1 = q.find();
        final String vmUuid = vm1.getUuid();
        final String hostUuid = vm1.getHostUuid();

        evtf.on(VmTracerCanonicalEvents.VM_STATE_CHANGED_PATH, new EventCallback() {
            @Override
            public void run(Map tokens, Object data) {
                VmTracerCanonicalEvents.VmStateChangedOnHostData d = (VmTracerCanonicalEvents.VmStateChangedOnHostData) data;
                if (d.getVmUuid().equals(vmUuid) && d.getTo() == VmInstanceState.Unknown
                        && d.getOriginalHostUuid().equals(hostUuid) && d.getCurrentHostUuid().equals(hostUuid)) {
                    success1 = true;
                } else if (d.getVmUuid().equals(vmUuid) && d.getTo() == VmInstanceState.Running &&
                        d.getOriginalHostUuid().equals(hostUuid) && d.getCurrentHostUuid().equals(hostUuid)) {
                    // abnormally started
                    success2 = true;
                }
            }
        });

        HostCapacityVO cap1 = dbf.findByUuid(hostUuid, HostCapacityVO.class);
        // set the status to Disconnected, otherwise a reconnect will be issued anyway
        sctrl.setSimulatorHostConnectionState(hostUuid, true);
        HostVO host = dbf.findByUuid(hostUuid, HostVO.class);
        host.setStatus(HostStatus.Disconnected);
        dbf.update(host);
        TimeUnit.SECONDS.sleep(3);
        vm1 = q.find();

        Assert.assertTrue(success1);
        Assert.assertFalse(success2);

        Assert.assertEquals(VmInstanceState.Unknown, vm1.getState());
        Assert.assertEquals(hostUuid, vm1.getHostUuid());
        HostCapacityVO cap2 = dbf.findByUuid(hostUuid, HostCapacityVO.class);
        Assert.assertEquals(cap1.getAvailableMemory(), cap2.getAvailableMemory());
        Assert.assertEquals(cap1.getAvailableCpu(), cap2.getAvailableCpu());

        bus.installBeforeDeliveryMessageInterceptor(new AbstractBeforeDeliveryMessageInterceptor() {
            @Override
            public void beforeDeliveryMessage(Message msg) {
                if (((RecalculateHostCapacityMsg) msg).getHostUuid().equals(hostUuid)) {
                    success3 = true;
                }
            }
        }, RecalculateHostCapacityMsg.class);

        sctrl.setSimulatorHostConnectionState(hostUuid, false);
        api.reconnectHost(hostUuid);
        TimeUnit.SECONDS.sleep(3);
        vm1 = q.find();
        Assert.assertEquals(VmInstanceState.Running, vm1.getState());
        Assert.assertTrue(success2);
        Assert.assertTrue(success3);
    }
}


text:
namespace renu3d {

    class renu3dSceneObject {
    private:
        bool getDataForAllNodes(aiNode *node);
        aiNode* findNode(aiNode* rootNode, const char *name);
        void transformNode(aiMatrix4x4 *result, aiNode* rootNode);

        const aiScene *scene;

    public:
        renu3dSceneObject();

        ~renu3dSceneObject();

        bool loadObjectFromFile(std::string fileName);

        std::string Name;   // Name of GameObject
        //std::map<std::string, std::shared_ptr<renu3d::renu3dMesh>> meshes;  // Meshes of this GameObject
        std::vector<std::shared_ptr<renu3d::renu3dMesh>> meshes;  // Meshes of this GameObject

    };

}


text:
import pytest

from app.broadcast_areas.models import CustomBroadcastAreas
from app.models.broadcast_message import BroadcastMessage
from tests import broadcast_message_json

@pytest.mark.parametrize(
    "areas, expected_area_ids", [({"simple_polygons": []}, []), ({"ids": ["123"], "simple_polygons": []}, ["123"])]
)
def test_area_ids(
    areas,
    expected_area_ids,
):
    broadcast_message = BroadcastMessage(broadcast_message_json(areas=areas))

    assert broadcast_message.area_ids == expected_area_ids

def test_simple_polygons():
    broadcast_message = BroadcastMessage(
        broadcast_message_json(
            area_ids=[
                # Hackney Central
                "wd21-E05009372",
                # Hackney Wick
                "wd21-E05009374",
            ],
        )
    )

    assert [
        [len(polygon) for polygon in broadcast_message.polygons.as_coordinate_pairs_lat_long],
        [len(polygon) for polygon in broadcast_message.simple_polygons.as_coordinate_pairs_lat_long],
    ] == [
        # One polygon for each area
        [27, 31],
        # Because the areas are close to each other, the simplification
        # and unioning process results in a single polygon with fewer
        # total coordinates
        [58],
    ]

def test_content_comes_from_attribute_not_template():
    broadcast_message = BroadcastMessage(broadcast_message_json())
    assert broadcast_message.content == "This is a test"

@pytest.mark.parametrize(
    ("areas", "expected_length"),
    [
        ({"ids": []}, 0),
        ({"ids": ["wd21-E05009372"]}, 1),
        ({"no data": "just created"}, 0),
        ({"names": ["somewhere"], "simple_polygons": [[[3.5, 1.5]]]}, 1),
    ],
)
def test_areas(areas, expected_length):
    broadcast_message = BroadcastMessage(broadcast_message_json(areas=areas))

    assert len(list(broadcast_message.areas)) == expected_length

def test_areas_treats_missing_ids_as_custom_broadcast(notify_admin):
    broadcast_message = BroadcastMessage(
        broadcast_message_json(
            areas={
                "ids": [
                    "wd20-E05009372",
                    "something else",
                ],
                # although the IDs may no longer be usable, we can
                # expect the broadcast to have names and polygons,
                # which is enough to show the user something
                "names": ["wd20 name", "something else name"],
                "simple_polygons": [[[1, 2]]],
            }
        )
    )

    assert len(list(broadcast_message.areas)) == 2
    assert type(broadcast_message.areas) == CustomBroadcastAreas

@pytest.mark.parametrize(
    "area_ids, approx_bounds",
    (
        (
            [
                "ctry19-N92000002",  # Northern Ireland (UTM zone 29N)
                "ctry19-W92000004",  # Wales (UTM zone 30N)
            ],
            [-8.2, 51.5, -2.1, 55.1],
        ),
        (
            [
                "lad21-E06000031",  # Peterborough (UTM zone 30N)
                "lad21-E07000146",  # Kings Lyn and West Norfolk (UTM zone 31N)
            ],
            [-0.5, 52.5, 0.8, 53.0],
        ),
        (
            [
                "wd21-E05009372",  # Hackney Central (UTM zone 30N)
                "wd21-E05009374",  # Hackney Wick (UTM zone 30N)
            ],
            [-0.1, 51.5, -0.0, 51.6],
        ),
        (
            [
                "wd21-E05009372",  # Hackney Central (UTM zone 30N)
                "test-santa-claus-village-rovaniemi-a",  # (UTM zone 35N)
            ],
            [-0.1, 51.5, 25.9, 66.6],
        ),
    ),
)
def test_combining_multiple_areas_keeps_same_bounds(area_ids, approx_bounds):
    broadcast_message = BroadcastMessage(broadcast_message_json(areas={"ids": area_ids}))

    assert (
        [round(coordinate, 1) for coordinate in broadcast_message.polygons.bounds]
        == [round(coordinate, 1) for coordinate in broadcast_message.simple_polygons.bounds]
        == (approx_bounds)
    )


text:
const winston = require('winston');

module.exports = function (app) {
  // Resources
  app.get('/resources/', async (req, res) => {
    try {
      const resources = await global.resourceService.getAllResources();
      if (!resources) {
        return res.status(400).send('Server Error');
      }
      return res.status(200).json(resources);
    } catch (error) {
      winston.error({
        error: String(error),
        stack: new Error().stack,
      });
      return res.status(400).send(error);
    }
  });

  // Resources
  app.get('/resources/enterprise-page', async (req, res) => {
    try {
      const resources = await global.resourceService.getEntrepriseResources();
      if (!resources) {
        return res.status(400).send('Server Error');
      }
      return res.status(200).json(resources);
    } catch (error) {
      winston.error({
        error: String(error),
        stack: new Error().stack,
      });
      return res.status(400).send(error);
    }
  });

  app.get('/resources/:type/:slug', async (req, res) => {
    const { type, slug } = req.params;
    try {
      const resource = await global.resourceService.getResource(type, slug);
      if (!resource) {
        return res.status(400).send('Server Error');
      }
      return res.status(200).json(resource);
    } catch (error) {
      winston.error({
        error: String(error),
        stack: new Error().stack,
      });
      return res.status(400).send(error);
    }
  });

  app.post('/resources/:type/:slug', async (req, res) => {
    const { type, slug } = req.params;
    const data = req.body || {};
    if (!data) {
      return res.send(204, 'No content'); // no content.
    }
    try {
      const lead = await global.salesLeadService.saveSalesRequest(data, req.params.type);
      if (!lead) {
        return res.status(400).send('Server Error');
      }
      if (lead.wantToSubscribe) {
        const newsListId = 'b0419808f9';
        global.mailChimpService.addSubscriber(newsListId, lead.salesEmail);
      }
      const resource = await global.resourceService.getResource(type, slug);
      if (!resource) {
        return res.status(400).end();
      }
      global.salesLeadService.sendSlackNotification(lead, resource.type, resource);
      global.mailService.sendResourceMail(lead, resource);
      return res.status(200).send('Whitepaper successfully requested');
    } catch (error) {
      winston.error({
        error: String(error),
        stack: new Error().stack,
      });
      return res.status(400).send(error);
    }
  });

  return app;
};


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/websecurityscanner/v1beta/crawled_url.proto

namespace Google\Cloud\WebSecurityScanner\V1beta;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web
 * Security Scanner Service crawls the web applications, following all links
 * within the scope of sites, to find the URLs to test against.
 *
 * Generated from protobuf message google.cloud.websecurityscanner.v1beta.CrawledUrl
 */
class CrawledUrl extends \Google\Protobuf\Internal\Message
{
    /**
     * The http method of the request that was used to visit the URL, in
     * uppercase.
     *
     * Generated from protobuf field string http_method = 1;
     */
    private $http_method = '';
    /**
     * The URL that was crawled.
     *
     * Generated from protobuf field string url = 2;
     */
    private $url = '';
    /**
     * The body of the request that was used to visit the URL.
     *
     * Generated from protobuf field string body = 3;
     */
    private $body = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $http_method
     *           The http method of the request that was used to visit the URL, in
     *           uppercase.
     *     @type string $url
     *           The URL that was crawled.
     *     @type string $body
     *           The body of the request that was used to visit the URL.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Websecurityscanner\V1Beta\CrawledUrl::initOnce();
        parent::__construct($data);
    }

    /**
     * The http method of the request that was used to visit the URL, in
     * uppercase.
     *
     * Generated from protobuf field string http_method = 1;
     * @return string
     */
    public function getHttpMethod()
    {
        return $this->http_method;
    }

    /**
     * The http method of the request that was used to visit the URL, in
     * uppercase.
     *
     * Generated from protobuf field string http_method = 1;
     * @param string $var
     * @return $this
     */
    public function setHttpMethod($var)
    {
        GPBUtil::checkString($var, True);
        $this->http_method = $var;

        return $this;
    }

    /**
     * The URL that was crawled.
     *
     * Generated from protobuf field string url = 2;
     * @return string
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * The URL that was crawled.
     *
     * Generated from protobuf field string url = 2;
     * @param string $var
     * @return $this
     */
    public function setUrl($var)
    {
        GPBUtil::checkString($var, True);
        $this->url = $var;

        return $this;
    }

    /**
     * The body of the request that was used to visit the URL.
     *
     * Generated from protobuf field string body = 3;
     * @return string
     */
    public function getBody()
    {
        return $this->body;
    }

    /**
     * The body of the request that was used to visit the URL.
     *
     * Generated from protobuf field string body = 3;
     * @param string $var
     * @return $this
     */
    public function setBody($var)
    {
        GPBUtil::checkString($var, True);
        $this->body = $var;

        return $this;
    }

}


text:
namespace agency
{
namespace detail
{

template<class T>
using executor_member_t = typename T::executor_type;

template<class T>
using executor_member_function_t = decay_t<decltype(std::declval<T*>()->executor())>;

template<class ExecutionPolicy>
struct execution_policy_executor
{
  // to detect an execution policy's executor_type,
  // first look for a member type named executor_type,
  // if it does not exist, look for a member function named .executor()
  using type = detected_or_t<
    executor_member_function_t<ExecutionPolicy>,
    executor_member_t, ExecutionPolicy
  >;
};

template<class ExecutionPolicy>
using execution_policy_executor_t = typename execution_policy_executor<ExecutionPolicy>::type;

// XXX nvcc can't correctly compile this implementation of has_executor_member_function in all cases
//// detects whether T::executor() exists
//template<class T>
//using has_executor_member_function = is_detected<executor_member_function_t, T>;

template<class T>
struct has_executor_member_function_impl
{
  template<
    class T2,
    class = decltype(std::declval<T2*>()->executor())
  >
  static std::true_type test(int);

  template<class>
  static std::false_type test(...);

  using type = decltype(test<T>(0));
};

template<class T>
using has_executor_member_function = typename has_executor_member_function_impl<T>::type;

// XXX nvcc can't correctly compile this implementation in all cases
// detects whether T::executor_type exists
//template<class T>
//using has_executor_member_type = is_detected<executor_member_t, T>;

__DEFINE_HAS_MEMBER_TYPE(has_executor_member_type, executor_type);

// detects whether T::executor() or T::executor_type or exist
template<class T>
using has_executor = disjunction<
  has_executor_member_function<T>,
  has_executor_member_type<T>
>;

template<class ExecutionPolicy, class T, class Enable = void>
struct policy_future {};

template<class ExecutionPolicy, class T>
struct policy_future<ExecutionPolicy,T,typename std::enable_if<has_executor<ExecutionPolicy>::value>::type>
{
  using type = executor_future_t<execution_policy_executor_t<ExecutionPolicy>, T>;
};

template<class ExecutionPolicy, class T>
using policy_future_t = typename policy_future<ExecutionPolicy,T>::type;

// XXX nvcc can't correctly compile this implementation in all cases
//template<class T>
//using execution_agent_type_member_t = typename T::execution_agent_type;
//
//template<class T>
//struct execution_policy_agent
//{
//  using type = detected_t<execution_agent_type_member_t, T>;
//};

__DEFINE_HAS_MEMBER_TYPE(has_execution_agent_type, execution_agent_type);

template<class ExecutionPolicy, class Enable = void>
struct execution_policy_agent {};

template<class ExecutionPolicy>
struct execution_policy_agent<ExecutionPolicy,typename std::enable_if<has_execution_agent_type<ExecutionPolicy>::value>::type>
{
  using type = typename ExecutionPolicy::execution_agent_type;
};

template<class T>
using execution_policy_agent_t = typename execution_policy_agent<T>::type;

// XXX nvcc can't correctly compile this implementation in all cases
//template<class T>
//using has_execution_agent_type = is_detected<execution_policy_agent_t, T>;

// returns T's ::execution_agent_type or nonesuch if T has no ::execution_agent_type
template<class T, class Default>
using execution_policy_agent_or_t = lazy_conditional_t<
  has_execution_agent_type<T>::value,
  execution_policy_agent<T>,
  identity<Default>
>;

// XXX nvcc can't correctly compile this implementation of execution_policy_param in all cases
template<class T>
using param_member_t = typename T::param_type;

template<class T>
using param_member_function_t = decay_t<decltype(std::declval<T*>()->param())>;

template<class ExecutionPolicy>
struct execution_policy_param
{
  // to detect an execution policy's param_type,
  // first look for a member type named param_type,
  // if it does not exist, look for a member function named .param()
  using type = detected_or_t<
    param_member_function_t<ExecutionPolicy>,
    param_member_t, ExecutionPolicy
  >;
};

template<class ExecutionPolicy>
using execution_policy_param_t = typename execution_policy_param<ExecutionPolicy>::type;

// XXX nvcc can't correctly compile this implementation of has_param_member_type in all cases
//// detects whether T::param() exists
//template<class T>
//using has_param_member_function = is_detected<param_member_function_t, T>;

template<class T>
struct has_param_member_function_impl
{
  template<
    class T2,
    class = decltype(std::declval<T2*>()->param())
  >
  static std::true_type test(int);

  template<class>
  static std::false_type test(...);

  using type = decltype(test<T>(0));
};

template<class T>
using has_param_member_function = typename has_param_member_function_impl<T>::type;

// XXX nvcc can't correctly compile this implementation of has_param_member_type in all cases
// detects whether T::param_type exists
//template<class T>
//using has_param_member_type = is_detected<param_member_t, T>;

__DEFINE_HAS_MEMBER_TYPE(has_param_member_type, param_type);

// detects whether T::param() or T::param_type or exist
template<class T>
using has_param = disjunction<
  has_param_member_function<T>,
  has_param_member_type<T>
>;

template<class ExecutionPolicy>
struct execution_policy_execution_depth
  : executor_execution_depth<
      execution_policy_executor_t<ExecutionPolicy>
    >
{};

template<class ExecutionPolicy>
struct execution_policy_execution_category
{
  using type = typename execution_agent_traits<execution_policy_agent_t<ExecutionPolicy>>::execution_category;
};

template<class ExecutionPolicy>
using execution_policy_execution_category_t = typename execution_policy_execution_category<ExecutionPolicy>::type;

} // end detail
} // end agency


text:
require 'rails_helper'

feature 'Ref switcher', feature: true, js: true do
  include WaitForAjax
  let(:user)      { create(:user) }
  let(:project)   { create(:project, :public) }

  before do
    project.team << [user, :master]
    login_as(user)
    visit namespace_project_tree_path(project.namespace, project, 'master')
  end

  it 'allow user to change ref by enter key' do
    click_button 'master'
    wait_for_ajax

    page.within '.project-refs-form' do
      input = find('input[type="search"]')
      input.set 'expand'

      input.native.send_keys :down
      input.native.send_keys :down
      input.native.send_keys :enter
    end

    expect(page).to have_title 'expand-collapse-files'
  end

  it "user selects ref with special characters" do
    click_button 'master'
    wait_for_ajax

    page.within '.project-refs-form' do
      page.fill_in 'Search branches and tags', with: "'test'"
      click_link "'test'"
    end

    expect(page).to have_title "'test'"
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent">

    <ListView android:id="@+id/list" android:layout_width="match_parent"
        android:layout_height="match_parent" android:background="@android:color/transparent"
        android:cacheColorHint="#00000000" android:descendantFocusability="afterDescendants"
        android:divider="@color/divider_list" android:dividerHeight="1px"
        android:fastScrollEnabled="false" />

    <com.easemob.easeui.widget.EaseSidebar android:id="@+id/sidebar" android:layout_width="30dp"
        android:layout_height="match_parent" android:layout_alignParentRight="true"
        android:background="@android:color/transparent" android:clickable="true" />

    <TextView android:id="@+id/floating_header" android:layout_width="wrap_content"
        android:layout_height="wrap_content" android:layout_centerInParent="true"
        android:background="@drawable/ease_show_head_toast_bg" android:gravity="center"
        android:paddingLeft="25dp" android:paddingRight="25dp"
        android:textColor="@android:color/white" android:textSize="40sp"
        android:visibility="invisible" />

</RelativeLayout><!-- From: file:/Users/Logan/development/android/as_workspace/EaseChatDemo/easeUI/src/main/res/layout/ease_widget_contact_list.xml -->