text:
package me.li2.android.tutorial.BasicUtils;

import android.content.Context;
import android.net.Uri;
import android.util.DisplayMetrics;

import java.io.IOException;
import java.io.InputStream;

/**
 * Created by weiyi on 09/04/2017.
 * https://github.com/li2
 */

public class ResourceUtils {
    private static final String ANDROID_RESOURCE = "android.resource://";
    private static final String FORWARD_SLASH = "/";

    public static Uri resourceIdToUri(Context context, int resourceId) {
        return Uri.parse(ANDROID_RESOURCE
                + context.getApplicationContext().getPackageName()
                + FORWARD_SLASH + resourceId);
    }

    public static String readRawFile(Context context, int resId) {
        String result = null;
        try {
            InputStream is = context.getResources().openRawResource(resId);
            int size = is.available();
            byte[] buffer = new byte[size];
            is.read(buffer);
            is.close();
            result = new String(buffer, "UTF-8");
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        return result;
    }

    private static DisplayMetrics sDisplayMetrics(Context context) {
        /*
        WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
        DisplayMetrics displayMetrics = new DisplayMetrics();
        windowManager.getDefaultDisplay().getMetrics(displayMetrics);
        return displayMetrics;
        */
        return context.getResources().getDisplayMetrics();
    }

    /**
     * Get screen density.
     * @param context
     * @return in dpi unit: 120, 160, 240, 320, 480, 640
     */
    public static int getScreenDensity(Context context) {
        return (int)(sDisplayMetrics(context).density * 160f);
    }

    public static String getScreenDensityName(Context context) {
        int dpi = sDisplayMetrics(context).densityDpi;

        switch (dpi)
        {
            case DisplayMetrics.DENSITY_LOW:
                return "ldpi";

            case DisplayMetrics.DENSITY_MEDIUM:
                return "mdpi";

            case DisplayMetrics.DENSITY_TV:
            case DisplayMetrics.DENSITY_HIGH:
                return "hdpi";

            case DisplayMetrics.DENSITY_XHIGH:
            case DisplayMetrics.DENSITY_280:
                return "xhdpi";

            case DisplayMetrics.DENSITY_XXHIGH:
            case DisplayMetrics.DENSITY_360:
            case DisplayMetrics.DENSITY_400:
            case DisplayMetrics.DENSITY_420:
                return "xxhdpi";

            case DisplayMetrics.DENSITY_XXXHIGH:
            case DisplayMetrics.DENSITY_560:
                return "xxxhdpi";
        }

        return "unknown";
    }

    /**
     * Get orientation of the screen.
     * @param context
     * @return May be one of ORIENTATION_LANDSCAPE, ORIENTATION_PORTRAIT.
     */
    public static int getScreenOrientation(Context context) {
        return context.getResources().getConfiguration().orientation;
    }

    /**
     * Get the exact physical pixels per inch of the screen in the X dimension.
     * (In the X/Y dimension means this value will be changed when orientation changed.)
     * @param context
     * @return in pixel unit.
     */
    public static int getScreenWidth(Context context) {
        return sDisplayMetrics(context).widthPixels;
    }

    /**
     * Get the exact physical pixels per inch of the screen in the Y dimension.
     * @param context
     * @return in pixel unit.
     */
    public static int getScreenHeight(Context context) {
        return sDisplayMetrics(context).heightPixels;
    }

    /**
     * Get dp of screen in the X dimension.
     * @param context
     * @return in dp unit.
     */
    public static int getScreenDpWidth(Context context) {
        return (int)(getScreenWidth(context) / sDisplayMetrics(context).density);
    }

    /**
     * Get dp of screen in the Y dimension.
     * @param context
     * @return in dp unit.
     */
    public static int getScreenDpHeight(Context context) {
        return (int)(getScreenHeight(context) / sDisplayMetrics(context).density);
    }

    /**
     * Get available screen width, this value changes when the screen's orientation switches between
     * landscape and portrait to reflect the current actual width that's available for your UI.
     *

     * layout-w<N>dp
     *

     * @param context
     * @return in dp unit
     */
    public static int getScreenAvailableDpWidth(Context context) {
        return getScreenDpWidth(context);
    }

    public static String getScreenInfo(Context context) {
        return "Screen Resolution " + getScreenWidth(context) + "x" + getScreenHeight(context) + "pixel"
                + "\n"
                + "Screen Density=" + getScreenDensity(context) + "dpi / " + getScreenDensityName(context)
                + " / " + getScreenDpWidth(context) + "x" + getScreenDpHeight(context) + "dp"
                + "\n"
                + "Screen Available Width=" + ResourceUtils.getScreenAvailableDpWidth(context) + "dp"
                ;
    }

    /**
     * Convert the dps to pixels, based on density scale
     * @param dp value expressed in dps
     * @return value expressed in pixels
     */
    public static int dpToPixel(Context context, int dp) {
        // Get the screen's density scaling factor
        float scale = context.getResources().getDisplayMetrics().density;
        // Add 0.5f to round the figure up to the nearest whole number
        return (int) (dp * scale + 0.5f);
    }
}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=fn.roundf32.html">

Redirecting to fn.roundf32.html...

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Cors;
using Microsoft.OfficeProPlus.Downloader.Model;
using OfficeVersionHistory.Business;
using OfficeVersionHistory.CustomAttributes;

namespace OfficeVersionHistory.Controllers
{
    [EnableCors(origins: "*", headers: "*", methods: "*")]
    public class ChannelController : ApiController
    {
        private readonly VersionDownloader _versionDownloader = null;

        public ChannelController()
        {
            _versionDownloader = new VersionDownloader();
        }

        // GET api/Channel
        [HttpHeaderAttribute("Access-Control-Allow-Origin", "*")]
        public async Task<List<UpdateChannel>> Get()
        {
            var updateChannels = await _versionDownloader.GetUpdateChannelsAsync();
            return updateChannels;
        }

        // GET api/Channel/GetChannel
        [HttpHeaderAttribute("Access-Control-Allow-Origin", "*")]
        [Route("api/Channel/GetChannel")]
        public async Task<UpdateChannel> GetChannel(string name)
        {
            var updateChannels = await _versionDownloader.GetUpdateChannelsAsync();
            var selectChannel = updateChannels.FirstOrDefault(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
            return selectChannel;
        }

    }
}


text:
[![Kayzen GS](https://raw.githubusercontent.com/esr360/K-Tooltips/gh-pages/logo-small.png "Kayzen GS Logo")](https://github.com/esr360/Kayzen-GS)

### K-Tooltips - A simple & lightweight tooltip solution.

> [View demo page for live examples](http://esr360.github.io/K-Tooltips/)

## Getting Started

Thanks for checking out K-Tooltips! Getting started is easy, but before you begin please ensure the following:

* Your project has jQuery 1.4 or higher
* You have Sass 3.4 or higher installed (required for customised options)

You can still use the default out-the-box options if you're not using Sass.

##### Bower Installation

```html
bower install K-Tooltips
```

#### Load the Assets

```html
<!-- Stylesheet -->
<link rel="stylesheet" href="k-tooltips.css">
<!-- JS -->
<script src="k-tooltips.js">
```

#### Add the Markup

```html
<div data-tooltip="This is the tooltip content">
	The Result (hover me)
</div>
```

#### Initialise the Function

```javascript
$("[data-tooltip]").tooltip();
```

## Default Tooltip

### Basic Example

#### Tooltip Markup

To create a tooltip, your element needs the `data-tooltip` **data-attribute**. The content of this attribute will make up your tooltip's content - HTML is allowed here.

```html
<div data-tooltip="This tooltip though">
	Hover Me
</div>
```

The above example uses the default styles as defined in **k-tooltips.scss**. Change these values to your liking to style your default tooltip.

```scss
$tooltip-options: (
	// Size & Appearance
	max-width      : 500px,
	padding        : 1em,
	distance       : -1em,
	background     : rgba(black, 0.75),
	border-radius  : 0.25em,
	arrow-size     : 0.5em,
	arrow-color    : rgba(black, 0.75),
	// Typography
	font-size      : 1em,
	color          : white,
	text-transform : none,
	font-weight    : normal,
	// Other
	transition     : 0.4s,
	z-index        : 9999
);
```

_Whilst some default examples use **em**'s, you can use any unit that would normally work._

##### max-width

This is the maximum width your tooltip can grow to before content begins to wrap.

##### padding

Set the padding (inner-spacing) of your custom tooltip.

##### distance

This is the distance which your tooltip should be from the element it corresponds to. For most use cases this value should be negative, as the CSS positioning works on a left-to-right/top-to-bottom basis.

##### background

Set the base background color for your tooltip and the corresponding directional-arrow.

##### border-radius

Set the radius of your tooltip's border. To disable the border, set this to **0**.

##### arrow-size

This is the size of the directional arrow for your tooltip.

##### arrow-color

Set the color for the tooltip's directional arrow - generally this should be the same color as the tooltip's background.

##### font-size

Set your tooltip's default font-size.

##### color

Set your tooltip's default text color.

##### text-transform

Set your tooltip's default text-transform property.

##### font-weight

Set your tooltip's default font weight.

##### transition

Set the animation speed at which your tooltip should fade in. To disable animations set this value to **0s**.

##### z-Index

Set the z-index for your tooltip. This should generally be a fairly large number to ensure it does not render underneath any element.

#### Tooltip Init

You need to call the **tooltip** function on your element:

```javascript
$("[data-tooltip]").tooltip();
```

The **tooltip** function accepts two custom parameters:

* Position
* Style

**Position** is a value from a hard coded list and can be either **top**, **bottom**, **left** or **right**. This sets the position of the tooltip element itself, so a value of **top** (default) would place the tooltip **above** the element.

**Style** controls the visual appearance of the tooltip. This value can be thought of as your tooltip's "theme". To create a theme, see the [custom tooltips](#custom-tooltips) section. This value is **default** by default, applying the default styles outlined above.

The above **init** is the same as writing:

```javascript
$("[data-tooltip]").tooltip({
	position : "top",
	style    : "default"
});
```

### Inline Example

To use K-Tooltips on an inline element, for example on a word in a sentence, your element also needs the **inline-tooltip** class:

```html
<span class="inline-tooltip" data-tooltip="This is an inline tooltip">
	inline-tooltip
</span>
```

## Custom Tooltips

It is possible to create any number of differently styled tooltips to use in your project. Here is an exampe of a tooltip using custom styles:

#### Creating the Styles

K-Tooltips come with a **light** theme which can be used instead of the default dark tooltip. You can add all other custom styles you may want below the provided **light** one, or above if you're feeling crazy.

```scss
$tooltip-styles: (
	light: (
		background : rgba(white, 0.8),
		color      : #444
	),
	demo-style-1: (
		transition     : 0s,
		distance       : -3em,
		background     : #34DDDD,
		border-radius  : 1em,
		arrow-size     : 1em,
		text-transform : uppercase
	)
);
```

Any style included here can be passed to the **style** parameter when initialising your tooltip:

```javascript
$("[data-tooltip]").tooltip({
	style : "demo-style-1"
});
```

If using more than one tooltip style in a single project, we cannot initialise the default tooltip on the naked `[data-tooltip]` element, we must do something like this:

```javascript
$("[data-tooltip]:not([class*="tooltip-"])").tooltip();
```

This allows us to apply the default tooltip to any element with the **data-tooltip** attribute as normal, whilst still allowing us to use other themes. The logic being that all custom styles will be applied with a unique class that contains the word **tooltip** followed by a hyphen:

```javascript
$(".tooltip-demo-style-1").tooltip({
	position : "bottom",
	style    : "demo-style-1"
});
```

Which would be used like so:

```html
<div class="tooltip-demo-style-1" data-tooltip="This is a custom tooltip">
	Hover Me
</div>
```

## More Examples

#### Left Tooltip

```html
<div class="tooltip-left" data-tooltip="This is a custom tooltip">
	Hover Me
</div>
<script>
	$(".tooltip-left").tooltip({
		position : "left"
	});
</script>
```

#### Right Tooltip

```html
<div class="tooltip-right" data-tooltip="This is a custom tooltip">
	Hover Me
</div>
<script>
	$(".tooltip-right").tooltip({
		position : "right"
	});
</script>
```

#### Light Tooltip

```html
<div class="tooltip-light" data-tooltip="This is a custom tooltip">
	Hover Me
</div>
<script>
	$(".tooltip-light").tooltip({
		style : "light"
	});
</script>
```

#### Custom Tooltip

```javascript
$tooltip-styles: (
	...
	demo-style-2: (
		background     : linear-gradient(to bottom, #00dbdb 0%, #258dc8 100%),
		border-radius  : 0,
		arrow-color    : #258dc8,
		transition     : 1.6s
	)
);
```

```html
<div class="tooltip-demo-style-2" data-tooltip="This is a custom tooltip">
	Hover Me
</div>
<script>
	$(".demo-style-2").tooltip({
		style : "tooltip-demo-style-2"
	});
</script>
```

## Help, Support & Contributing

For all issues, bugs suggestions and feature requests, please use the [Github issues page](https://github.com/esr360/K-Tooltips/issues). Any and all contributions are welcomed!

Follow [@esr360](https://twitter.com/ESR360) on Twitter!


text:
package org.wso2.developerstudio.eclipse.gmf.esb.impl;

import org.eclipse.emf.ecore.EClass;

import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import org.wso2.developerstudio.eclipse.gmf.esb.FailoverEndPointWestOutputConnector;

/**
 *
 * An implementation of the model object 'Failover End Point West Output Connector'.
 *
 *
 * @generated
 */
public class FailoverEndPointWestOutputConnectorImpl extends OutputConnectorImpl
        implements FailoverEndPointWestOutputConnector {
    /**
     *
     *
     * @generated
     */
    protected FailoverEndPointWestOutputConnectorImpl() {
        super();
    }

    /**
     *
     *
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return EsbPackage.Literals.FAILOVER_END_POINT_WEST_OUTPUT_CONNECTOR;
    }

} // FailoverEndPointWestOutputConnectorImpl


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WebPlatform.Core.Composition;

namespace WebPlatform.Tests.Core
{
   /// <summary>
   ///   Test the service runtime.
   /// </summary>
   [TestClass]
   public class RuntimeTests
   {
      /// <summary>
      ///   Tests the runtime creation.
      /// </summary>
      [TestMethod]
      public void TestRuntimeCreation()
      {
         var moduleTypes = TypeCatalog.With
         (
            ModuleType.For<ConsumerModule>(),
            ModuleType.For<ProviderModule>()
         );
         using (var runtime = Runtime.With(moduleTypes))
         {
            // tries to resolve the test module
            ProviderModule providerModule;
            Assert.IsTrue(runtime.TryGet("ProviderModule", out providerModule));
            ConsumerModule consumerModule;
            Assert.IsTrue(runtime.TryGet("ConsumerModule", out consumerModule));
            Assert.IsTrue(consumerModule.IsInitialized);

            Assert.IsNotNull(consumerModule.TestService);
            Assert.AreSame(runtime.Locator.Resolve<ITestService>(), consumerModule.TestService);
         }
      }
   }
}


text: Rails.application.config.session_store :cookie_store, key: '_raters-of-the-lost-arc_session'


text:
import {DateWrapper, isPresent, isBlank, Json} from '@angular/facade';
import {PromiseWrapper} from '@angular/facade';

import {bind, provide, Provider, OpaqueToken} from '@angular/core/src/di';

import {Reporter} from '../reporter';
import {SampleDescription} from '../sample_description';
import {MeasureValues} from '../measure_values';
import {Options} from '../common_options';

/**
 * A reporter that writes results into a json file.
 */
export class JsonFileReporter extends Reporter {
  // TODO(tbosch): use static values when our transpiler supports them
  static get PATH(): OpaqueToken { return _PATH; }
  // TODO(tbosch): use static values when our transpiler supports them
  static get BINDINGS(): Provider[] { return _PROVIDERS; }

  _writeFile: Function;
  _path: string;
  _description: SampleDescription;
  _now: Function;

  constructor(sampleDescription, path, writeFile, now) {
    super();
    this._description = sampleDescription;
    this._path = path;
    this._writeFile = writeFile;
    this._now = now;
  }

  reportMeasureValues(measureValues: MeasureValues): Promise<any> {
    return PromiseWrapper.resolve(null);
  }

  reportSample(completeSample: MeasureValues[], validSample: MeasureValues[]): Promise<any> {
    var content = Json.stringify({
      'description': this._description,
      'completeSample': completeSample,
      'validSample': validSample
    });
    var filePath =
        `${this._path}/${this._description.id}_${DateWrapper.toMillis(this._now())}.json`;
    return this._writeFile(filePath, content);
  }
}

var _PATH = new OpaqueToken('JsonFileReporter.path');
var _PROVIDERS = [
  bind(JsonFileReporter)
      .toFactory((sampleDescription, path, writeFile, now) =>
                     new JsonFileReporter(sampleDescription, path, writeFile, now),
                 [SampleDescription, _PATH, Options.WRITE_FILE, Options.NOW]),
  provide(_PATH, {useValue: '.'})
];


text:
package com.adobe.epubcheck.api;

import java.util.Set;

import com.adobe.epubcheck.messages.MessageId;
import com.adobe.epubcheck.opf.OPFData;
import com.google.common.collect.ImmutableSet;

public enum EPUBProfile
{
  DEFAULT,
  IDX,
  DICT,
  EDUPUB;

  /**
   * Checks a given validation profile against the dc:type(s) declared in an OPF
   * and returns a possibly overriden profile.
   *

   * For instance, if the publication has a 'edupub' dc:type and the DEFAULT
   * validation profile is given, the EDUPUB profile will be returned instead.
   *

   *

   * If the given validation profile is modified, report an INFO message
   * OPF_064.
   *

   *
   * @param profile
   *          a validation profile.
   * @param opfData
   *          the parsed OPF data (contains the publication's dc:type(s)).
   * @param path
   *          the path to use for reporting messages.
   * @param report
   *          the message report.
   * @return The given profile if it's compatible with the OPF dc:type(s), or
   *         else a compatible non-null validation profile.
   */
  public static EPUBProfile makeOPFCompatible(EPUBProfile profile, OPFData opfData, String path,
      Report report)
  {

    Set<String> pubTypes = opfData != null ? opfData.getTypes() : ImmutableSet.<String> of();
    if (pubTypes.contains(OPFData.DC_TYPE_EDUPUB) && profile != EPUBProfile.EDUPUB)
    {
      report.message(MessageId.OPF_064, EPUBLocation.create(path), OPFData.DC_TYPE_EDUPUB,
          EPUBProfile.EDUPUB);
      return EPUBProfile.EDUPUB;
    }
    else
    {
      return profile != null ? profile : EPUBProfile.DEFAULT;
    }
  }
}


text:
<?php echo form_tag('comment/save', array(
  'id'        => 'sf_admin_edit_form',
  'name'      => 'sf_admin_edit_form',
  'multipart' => true,
)) ?>

<?php echo object_input_hidden_tag($blog_comment, 'getId') ?>

<fieldset id="sf_fieldset_test" class="">

<?php echo __('Test') ?>

  <?php echo label_for('blog_comment[email]', __($labels['blog_comment{email}']), '') ?>
  <div class="content<?php if ($sf_request->hasError('blog_comment{email}')): ?> form-error<?php endif; ?>">
  <?php if ($sf_request->hasError('blog_comment{email}')): ?>
    <?php echo form_error('blog_comment{email}', array('class' => 'form-error-msg')) ?>
  <?php endif; ?>

  <?php $value = object_input_tag($blog_comment, 'getEmail', array (
  'size' => 80,
  'control_name' => 'blog_comment[email]',
)); echo $value ? $value : ' ' ?>

</fieldset>

<?php include_partial('edit_actions', array('blog_comment' => $blog_comment)) ?>

</form>

<?php if ($blog_comment->getId()): ?>
<?php echo button_to(__('delete'), 'comment/delete?id='.$blog_comment->getId(), array (
  'post' => true,
  'confirm' => __('Are you sure?'),
  'class' => 'sf_admin_action_delete',
)) ?><?php endif; ?>


text:
using System;
using System.ComponentModel;
using System.Globalization;

namespace CSharpGL
{
    /// <summary>
    /// Supports editing values in PropertyGrid.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    internal class StructTypeConverter<T> : TypeConverter where T : struct, ILoadFromString
    {
        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            return sourceType == typeof(string);
        }

        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
        {
            return destinationType == typeof(T);
        }

        public override object ConvertFrom(ITypeDescriptorContext context,
            CultureInfo culture, object value)
        {
            var result = default(T);
            result.Load(value as string);

            return result;
        }

        public override object ConvertTo(ITypeDescriptorContext context,
            CultureInfo culture, object value, Type destinationType)
        {
            object result;
            if (destinationType == typeof(string))
            {
                result = value.ToString();
            }
            else
            {
                result = base.ConvertTo(context, culture, value, destinationType);
            }
            return result;
        }
    }
}


text:
package models

import javax.inject.Inject

import akka.actor.ActorRef
import akka.stream.scaladsl.Source
import akka.util.Timeout
import com.github.jeroenr.bson.BsonDocument
import com.github.jeroenr.bson.BsonDsl._
import com.github.jeroenr.bson.element.BsonObjectId
import com.github.jeroenr.tepkin.protocol.result.DeleteResult
import helpers.BsonDocumentHelper._
import play.api.libs.json.{JsResult, JsSuccess, Json}
import play.api.modules.tepkinmongo.TepkinMongoApi

import scala.concurrent.Future
import scala.concurrent.duration._

/**
 * Created by bistokdl on 3/30/16.
 */
case class Product(_id: String, name: String, price: Double){
  def update(newName: String, newPrice: Double): Product = {
    Product(_id,newName,newPrice)
  }
}

object Product {
  implicit val productFormatter = Json.format[Product]
  def apply(bson: BsonDocument): JsResult[Product] = {
    Json.fromJson[Product](bson)
  }

  def toBsonDocument(product: Product): BsonDocument = {
    ("_id" := product._id)~
      ("name" := product.name)~
      ("price":= product.price)~
  }
}

class ProductRepo @Inject()(tepkinMongoApi: TepkinMongoApi) {
  implicit val ec = tepkinMongoApi.client.ec
  implicit val timeout: Timeout = 5.seconds

  val products = tepkinMongoApi.client(tepkinMongoApi.db)("products")

  def create(name: String, price: Double): Future[Option[Product]] = {
    val id = BsonObjectId.generate.identifier
    val product =
      ("_id" := id)~
        ("name" := name) ~
        ("price" := price)
    products.insert(product).flatMap[Option[Product]](ir=>findBy("_id",id))
  }

  def all: Source[List[Product],ActorRef] = {
    products.find(new BsonDocument()).map(l => l.map(Product(_)).collect {
      case JsSuccess(p, _ ) => p
    })
  }

  def insert(ps: List[Product]) =
    products.insert(ps.map(Product.toBsonDocument))

  def findByName(name: String): Future[Option[Product]]={
    val byId = "name" := name
    products.findOne(byId).map(_.flatMap(Product(_).asOpt))
  }

  def findBy(key: String, value: String): Future[Option[Product]]={
    val query = key := value
    products.findOne(query).map(_.flatMap(Product(_).asOpt))
  }

  def update(product: Product): Future[Option[Product]] = {
    val byId = "_id" := product._id
    products.update(byId,Product.toBsonDocument(product)).flatMap(ir=>findBy("_id",product._id))
  }

  def delete(id: String): Future[DeleteResult] = {
    val byId = "_id" := id
    products.delete(byId)
  }

  def drop = products.drop()
}


text:
@interface CommentTableViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *authorLabel;
@property (weak, nonatomic) IBOutlet UILabel *publishDateLabel;
@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@end

@implementation CommentTableViewCell

- (void)setupCellWithCommentModel:(CommentModel *)model {
    self.authorLabel.text = model.authorModel.name;
    self.publishDateLabel.text = [model.publishDate stringWithFormate:yyMMddHHmm];
    self.contentLabel.text = [model.content deleteHTMLTag];
}

- (CGFloat)cellHeightForCommentModel:(CommentModel *)model tableWidth:(CGFloat)width {
    [self setupCellWithCommentModel:model];
    self.contentLabel.preferredMaxLayoutWidth = width - 20;
    return [self.contentView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height + 1;
}

@end


text:
class Prunr::Rule

  ## initializer with options hash
  def initialize(options) end

  ## returns the modified objects array with kept elements removed
  def filter(objects) objects end

end

Dir["#{File.dirname(__FILE__)}/rules/*.rb"].each do |file|
  require file
end


text:
using InspectorReflector;
using UnityEngine;

[EnableIR]
public class ColorSample : MonoBehaviour
{
    [Inspect]
    public Color Field;

    [Inspect]
    public Color Property { get => Field; set => Field = value; }

    [Inspect]
    public Color ReadonlyProperty { get => Field; }

    [Inspect(InspectionKind.Immutable)]
    public Color PropertyAsReadonly { get => Field; set => Field = value; }

    [Inspect(InspectionKind.ImmutableSelectable)]
    public Color PropertyAsSelectable { get => Field; set => Field = value; }
}


text:
define([
	'jquery',
	'underscore',
	'scripts/models/events/user-event'
], function($, _, UserEvent) {
	return UserEvent.extend({

		//
		// attributes
		//

		event_type: undefined,
		project_uid: undefined,
		project_full_name: undefined,
		project_short_name: undefined,

		//
		// overridden Backbone methods
		//

		parse: function(response) {

			// call superclass method
			//
			var JSON = UserEvent.prototype.parse.call(this, response);

			// parse subfields
			//
			JSON.user = new User(
				response.user
			);

			return JSON;
		},
	});
});


text:
module OpenLists
  module GenericHelper

    # @return the path for a new item
    def new_item_path
      return "/#{module_base_url}/#{params[:domain]}/#{params[:list_name]}/new" if params[:domain] and params[:list_name]
      "/#{module_base_url}/#{@domain.to_param}"
    end

    # @return the path to the list item passed (default is current)
    # @param [DynamicModel::ActiveRecordExtension] item
    def item_path(item = @item)
      return "#{model_path(item.class)}/#{item.to_param}" unless item.nil?
      "/#{module_base_url}/#{params[:domain]}/#{params[:list_name]}/#{params[:id]}" if params[:domain] and params[:list_name] and params[:id]
    end

    # @return the path to the list index passed (default is current)
    # @param [Class] model
    def model_path(model = @model)
      "/#{module_base_url}/#{model.to_param}"
    end

    # @return the edit path to the list item passed (default is current)
    # @param [DynamicModel::ActiveRecordExtension] item
    def edit_item_path(item = @item)
      "#{item_path item}/edit"
    end

    # @return provides an option hash for the form tag as the controller is very specific
    # @param [DynamicModel::ActiveRecordExtension] item
    def form_options(item = @item)
      {url: item_path(item), controller: 'OpenLists::Generic'}
    end

    ##
    # @return the html to display the attribute of the item
    # @param [ActiveRecord::Base] item
    # @param [String] attribute
    def field_as_display_element(item, attribute)
      attribute_type = item.class.columns_hash[attribute].type
      case attribute_type
        when :integer
          # Special case: is it a link to another table
          if item.class.reflections.keys.include? attribute.gsub(DynamicModel::RelationsAnalyser::KEY_IDENTIFIER, '').to_sym
            child = item.send attribute.gsub(DynamicModel::RelationsAnalyser::KEY_IDENTIFIER, '').to_sym
            return link_to(display_name_for_item(child), item_path(child))
          end
          # Else just show the number
          item.attributes[attribute]
        when :boolean
          check_box_tag attribute, "", item.attributes[attribute], disabled: true
        else
          h item.attributes[attribute]
      end
    end

    ##
    # @return the html to edit the attribute of the item
    # @param [ActionView::Helpers::FormBuilder] form
    # @param [Class] model (descendant of ActiveRecord::Base)
    # @param [String] attribute
    def field_as_edit_element(form, model, attribute)
      attribute_type =  model.columns_hash[attribute].type
      case attribute_type
        when :integer
          # Is it the primary key ?
          return form.text_field(attribute.to_sym, disabled: true) if attribute == model.primary_key
          # Special case: is it a link to another table?
          # if it is, then it should end with DynamicModel::RelationsAnalyser::KEY_IDENTIFIER
          reflection_key = attribute.gsub(DynamicModel::RelationsAnalyser::KEY_IDENTIFIER, '').to_sym
          if model.reflections.keys.include? reflection_key
            content = model.reflections[reflection_key].class_name.constantize.all.map do |s|
              [ display_name_for_item(s), s[s.class.primary_key] ]
            end
            return form.select(attribute, content, {include_blank: I18n.t('openlists.none', default: 'None')})
          end
          # Else just show the number
          form.number_field attribute.to_sym
        when :boolean
          form.check_box attribute.to_sym
        when :datetime
          if ['created_at', 'updated_at'].include? attribute
            form.text_field attribute.to_sym, disabled: true
          else
            form.text_field attribute.to_sym, class: "date-picker-field"
          end
        else
          form.text_field attribute.to_sym
      end
    end

  end
end


text:
package com.maizer.text.util;

import com.maizer.text.cursor.CursorDevicer;
import com.maizer.text.cursor.CursorDevicer.CursorHelper;
import com.maizer.text.layout.FormatLayout;
import com.maizer.text.layout.TextAreaLayout;
import com.maizer.text.view.TextAreaView;
import com.maizer.text.view.TextAreaView.OnImeActionListener;

import android.R;
import android.annotation.SuppressLint;
import android.content.ClipData;
import android.content.ClipDescription;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.Selection;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.CorrectionInfo;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.ExtractedTextRequest;
import android.view.inputmethod.InputMethodManager;

/**
 * AbsInputConnector ,ÎÒÃÇÐèÒªÌí¼Ó¸ºÖµ±ê¼Ç,Çë×¢Òâ
 *
 * @author Maizer/ÂóÔó
 *
 */
public class TextInputConnector extends BaseInputConnection {
	@Override
	public void closeConnection() {
		super.closeConnection();
		ourView = null;
		mEditText = null;
		mBatchString = null;
		Log.e(TAG, "close");
	}

	@Override
	public boolean deleteSurroundingTextInCodePoints(int beforeLength, int afterLength) {
		// TODO Auto-generated method stub
		return super.deleteSurroundingTextInCodePoints(beforeLength, afterLength);
	}

	@Override
	public CharSequence getTextBeforeCursor(int n, int flags) {
		return null;
	}

	@Override
	public CharSequence getTextAfterCursor(int n, int flags) {
		return null;
	}

	public Editable getEditable() {
		if (noTrick) {
			return mEditText;
		}
		return TRICK_TEXT;
	}

	@Override
	public CharSequence getSelectedText(int flags) {
		return null;
	}

	@Override
	public boolean clearMetaKeyStates(int states) {
		return super.clearMetaKeyStates(states);
	}

	private static final String TAG = TextInputConnector.class.getCanonicalName();

	/**
	 * ±êʶ
	 */
	public static final int INPUT_EVENT = -100;
	public static final int INPUT_MOVE_DOWN = -1;
	public static final int INPUT_MOVE_UP = -2;
	public static final int INPUT_MOVE_LEFT = -3;
	public static final int INPUT_MOVE_RIGHT = -4;

	public static final int INPUT_MOVE_SHIF_DOWN = -5;
	public static final int INPUT_MOVE_SHIF_UP = -6;
	public static final int INPUT_MOVE_SHIF_LEFT = -7;
	public static final int INPUT_MOVE_SHIF_RIGHT = -8;

	public static final int INPUT_COPY = -9;
	public static final int INPUT_COPYURL = -10;
	public static final int INPUT_SWITHINPUT = -11;
	public static final int INPUT_PASTE = -12;
	public static final int INPUT_ENTER = -13;

	private static final SpannableStringBuilder TRICK_TEXT = new SpannableStringBuilder("     ");
	private static final ExtractedText EXTRACTED_TEXt = new ExtractedText();
	private Editable mEditText;
	private TextAreaView ourView;
	private StringBuilder mBatchString;
	/**
	 * Ëø¶¨shift¼ü
	 */
	private boolean isShift;
	private boolean isBatch;
	/**
	 * ¶ÔÓÚijЩ´øÒƱêµÄÊäÈë·¨,ÎÒÃÇÐèҪαװÀ´»ñÈ¡Òƶ¯±ê¼Ç,½öÏÞ´¹Ö±ÊÓͼ,Ç¿ÁÒ½¨Òé´óÎı¾Ê¹ÓÃTrick,ĬÈÏ¿ªÆô
	 */
	private boolean noTrick;

	/**
	 * ³éÏóµÄÊäÈë·¨Á¬½ÓÀà,
	 *
	 * @param editor
	 */

	public TextInputConnector(Editable editor, TextAreaView view) {
		super(view, true);
		if (view == null || editor == null) {
			throw new NullPointerException();
		}
		mEditText = editor;
		ourView = view;
	}

	/**
	 * @hide
	 */
	public void setEditable(Editable editable) {
		mEditText = editable;
	}

	@Override
	public int getCursorCapsMode(int reqModes) {
		int end = getSelectEnd();
		return TextUtils.getCapsMode(getText(), end == -1 ? 0 : end, reqModes);
	}

	@Override
	public boolean deleteSurroundingText(int beforeLength, int afterLength) {
		if (beforeLength > afterLength) {
			int len = beforeLength - afterLength;
			if (mBatchString != null && mBatchString.length() > len) {
				int length = mBatchString.length();
				mBatchString.delete(length - len, length);
				return true;
			}
			deleteSelect(getSelectStart(), getSelectEnd());
		}
		return true;
	}

	/**
	 * need trick input keyboard,if password mode,using suggest
	 *
	 * @param t
	 */
	public void setTrick(boolean t) {
		noTrick = t;
	}

	@Override
	public boolean setComposingText(CharSequence text, int newCursorPosition) {
		return super.setComposingText(text, newCursorPosition);
	}

	@Override
	public boolean setComposingRegion(int start, int end) {
		return super.setComposingRegion(start, end);
	}

	// public Editable getEditable() {
	// return mEditText;
	// }

	@Override
	public boolean finishComposingText() {
		setShift(false);
		int start = getSelectStart();
		int end = getSelectEnd();
		if (start != end) {
			if (start > end) {
				setSelectToEditor(start);
			} else {
				setSelectToEditor(end);
			}
		}
		return super.finishComposingText();
	}

	@Override
	public boolean commitText(CharSequence text, int newCursorPosition) {
		if (isBatch && mBatchString != null) {
			mBatchString.append(text);
			return true;
		}
		// setComposingSpans(mEditText);
		// super.commitText(text, newCursorPosition);
		commitText(getSelectStart(), getSelectEnd(), text);
		return true;
	}

	@Override
	public boolean commitCompletion(CompletionInfo text) {
		Log.e(TAG, "commoot");
		return false;
	}

	@Override
	public boolean commitCorrection(CorrectionInfo correctionInfo) {
		Log.e(TAG, "commootCorre");
		return true;
	}

	public Editable getText() {
		return mEditText;
	}

	protected boolean isShift() {
		return isShift;
	}

	protected void setShift(boolean s) {
		isShift = s;
	}

	protected int getSelectStart() {
		return Selection.getSelectionStart(getText());
	}

	protected int getSelectEnd() {
		return Selection.getSelectionEnd(getText());
	}

	protected int length() {
		return getText().length();
	}

	private void delete(int st, int en) {
		getText().delete(st, en);
	}

	protected void insert(int start, CharSequence text) {
		Editable edit = getText();
		if (start == -1) {
			edit.insert(0, text);
			if (edit.length() > 0 && text != null) {
				Selection.setSelection(edit, text.length());
			}
		} else {
			edit.insert(start, text);
		}
	}

	protected void replace(int st, int en, CharSequence source, int start, int end) {
		getText().replace(st, en, source, start, end);
	}

	protected void setSelectToEditor(int start, int end) {
		Selection.setSelection(getText(), start, end);
	}

	protected void setSelectToEditor(int start) {
		if (isShift() && start >= 0) {
			Selection.setSelection(getText(), getSelectStart(), start);
		} else {
			Selection.setSelection(getText(), start);
		}
	}

	protected void getCharsforSelect(int start, int end, char[] dest, int destoff) {
		getText().getChars(start, end, dest, destoff);
	}

	protected char getChar(int index) {
		return getText().charAt(index);
	}

	/**
	 * mask our text
	 */
	@Override
	public ExtractedText getExtractedText(ExtractedTextRequest request, int flags) {
		if (noTrick) {
			EXTRACTED_TEXt.text = getText();
			EXTRACTED_TEXt.partialStartOffset = 0;
			EXTRACTED_TEXt.partialEndOffset = getText().length();
			EXTRACTED_TEXt.selectionStart = getSelectStart();
			EXTRACTED_TEXt.selectionEnd = getSelectEnd();
			return EXTRACTED_TEXt;
		}
		Log.e(TAG,
				"" + request.flags + "  " + request.hintMaxChars + "  " + request.hintMaxLines + "  " + request.token);
		int trickLength = TRICK_TEXT.length();
		int realLength = length();
		int start = getSelectStart();
		int end = getSelectEnd();
		int m = -1;
		if (start > end) {
			m = start;
			start = end;
			end = m;
		}
		if (start != end) {
			if (start != 0) {
				start = trickLength >> 1;
			}
			if (end != realLength) {
				end = (trickLength >> 1) + 1;
			} else {
				end = trickLength;
			}
		} else {
			if (start <= 0) {
				start = end = 0;
			} else if (start == realLength) {
				start = end = trickLength;
			} else {
				start = end = trickLength >> 1;
			}
		}
		Log.e(TAG, "GETTrick>" + start + "  " + end);
		Selection.setSelection(TRICK_TEXT, start, end);
		EXTRACTED_TEXt.text = TRICK_TEXT;
		EXTRACTED_TEXt.partialStartOffset = 0;
		EXTRACTED_TEXt.partialEndOffset = trickLength;
		EXTRACTED_TEXt.selectionStart = start;
		EXTRACTED_TEXt.selectionEnd = end;
		return EXTRACTED_TEXt;
	}

	/**
	 * ÎÒÃÇ×Ô¼º²»ÄÜʹÓÃÕâ¸ö·½´ï²Ù×÷ÎÒÃǵÄEditable,·ñÔò½«Ö±½Óµ¼ÖÂÎó²î,Èç¹ûÄã²»ÐèҪƭȡÒƶ¯±êʶ Ç븲д¸Ã·½·¨,Ç¿ÁÒ½¨Òé´óÎı¾Ê¹ÓÃTrick
	 */
	@Override
	public boolean setSelection(int start, int end) {

		if (noTrick) {
			setSelectToEditor(start, end);
			return true;
		}
		int oldStart = Selection.getSelectionStart(TRICK_TEXT);
		int oldEnd = Selection.getSelectionEnd(TRICK_TEXT);

		int mStart = getSelectStart();
		int mEnd = getSelectEnd();

		if (start == end) {
			if (start < oldStart || start < oldEnd) {
				if (start == 0) {
					setSelectToEditor(0);
				} else {
					sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_LEFT));
				}
			} else if (start > oldStart || start > oldEnd) {
				if (start == 0) {
					setSelectToEditor(0);
				} else if (start == TRICK_TEXT.length() && mStart == mEnd && mEnd != length()) {
					setSelectToEditor(length());
				} else {
					sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_RIGHT));
				}
			} else {
				if (start == 0) {
					setSelectToEditor(0);
				} else if (start == TRICK_TEXT.length()) {
					setSelectToEditor(length());
				}
			}
		} else {
			if (oldStart == end) {
				if (start == 0) {
					setSelectToEditor(0, mStart);
				} else {
					if (mEnd > mStart) {
						mEnd = mStart;
					}
					setSelectToEditor(mStart, mEnd > 1 ? mEnd - 1 : 0);
				}
				return true;
			}
			if (oldEnd == start) {
				if (end == 0) {
					setSelectToEditor(mStart, 0);
				} else if (end == TRICK_TEXT.length()) {
					setSelectToEditor(mStart, length());
				} else if (end < oldEnd) {
					setSelectToEditor(mStart, --mEnd);
				} else {
					if (mEnd < mStart) {
						mEnd = mStart;
					}
					setSelectToEditor(mStart, ++mEnd);
				}
				return true;
			}
			if (end < oldEnd) {
				if (end == 0) {
					setSelectToEditor(mStart, 0);
				} else {
					if (start != end) {
						setShift(true);
					}
					sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_LEFT));
				}
			} else if (end > oldEnd) {
				if (end == TRICK_TEXT.length()) {
					setSelectToEditor(mStart, length());
				} else {
					if (start != end) {
						setShift(true);
					}
					sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DPAD_RIGHT));
				}
			} else {
				if (start == 0) {
					setSelectToEditor(0, length());
				} else if (start < oldStart) {
					setSelectToEditor(--mStart, length());
				} else if (start > oldStart) {
					setSelectToEditor(++mStart, length());
				}
			}
		}
		return true;
	}

	private void copy() {
		ClipboardManager cm = (ClipboardManager) ourView.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
		if (cm == null) {
			Log.e(TAG, "System Error : clipboardManager die!");
			return;
		}
		CharSequence text = getText();
		int start = Selection.getSelectionStart(text);
		int end = Selection.getSelectionEnd(text);
		if (start != end) {
			if (start > end) {
				int d = start;
				start = end;
				end = d;
			}
			Intent intent = new Intent();
			intent.setType(ClipDescription.MIMETYPE_TEXT_INTENT);
			ClipData data = ClipData.newPlainText("", text.subSequence(start, end));
			cm.setPrimaryClip(data);
		}
	}

	public boolean performEditorAction(int actionCode) {
		return super.performEditorAction(actionCode);
	}

	@Override
	public boolean performContextMenuAction(int id) {
		switch (id) {
		case R.id.selectAll:
			setSelectToEditor(0, length());
			break;
		case R.id.cut:
			copy();
			deleteSelect(getSelectStart(), getSelectEnd());
			break;
		case R.id.startSelectingText:
			setShift(true);
			break;
		case R.id.stopSelectingText:
			setShift(false);
			break;
		case R.id.copy:
			copy();
			break;
		case R.id.paste:
			ClipboardManager cm = (ClipboardManager) ourView.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
			if (cm == null) {
				Log.e(TAG, "System Error : clipboardManager die!");
				return true;
			}
			commitText(getSelectStart(), getSelectEnd(), "");
			ClipData data = cm.getPrimaryClip();
			if (data == null) {
				return true;
			}
			if (data.getItemCount() > 0) {
				CharSequence clipText = data.getItemAt(0).getText();
				int end = Selection.getSelectionEnd(getText());
				insert(end, clipText);
			}
			break;
		case R.id.copyUrl:
			send(INPUT_COPYURL);
			break;
		case R.id.switchInputMethod:
			break;
		default:
			return false;
		}
		return true;
	}

	private boolean send(int code) {
		CursorHelper mCursorMove = ourView.getCursorHelper();
		CursorDevicer mCursorDevicer = ourView.getCursorDivicer();
		OnImeActionListener mActionListener = ourView.getImeActionListener();
		int mImeOptions = ourView.getImeOptions();
		boolean handle = false;
		switch (code) {
		case TextInputConnector.INPUT_ENTER:
			if (TextAreaView.isShareCursor(mCursorDevicer)) {
				int flag = mImeOptions & EditorInfo.IME_MASK_ACTION;
				switch (flag) {
				case EditorInfo.IME_ACTION_NEXT:
					View view = ourView.focusSearch(View.FOCUS_DOWN);
					if (view != null) {
						ourView.clearFocus();
						view.requestFocus();
						return true;
					}
					break;
				case EditorInfo.IME_ACTION_PREVIOUS:
					view = ourView.focusSearch(View.FOCUS_UP);
					if (view != null) {
						view.requestFocus();
						return true;
					}
					break;
				case EditorInfo.IME_ACTION_DONE:
					if (mActionListener != null) {
						hideInput();
						mActionListener.onDoneAction(ourView);
					}
					if (ourView.isSingleLine()) {
						hideInput();
						return true;
					}
					return false;
				case EditorInfo.IME_ACTION_GO:
					if (mActionListener != null) {
						hideInput();
						mActionListener.onGoAction(ourView);
						return true;
					}
					if (ourView.isSingleLine()) {
						hideInput();
						return true;
					}
					return false;
				case EditorInfo.IME_ACTION_SEARCH:
					if (mActionListener != null) {
						hideInput();
						mActionListener.onSearchAction(ourView);
						return true;
					}
					if (ourView.isSingleLine()) {
						hideInput();
						return true;
					}
					return false;
				case EditorInfo.IME_ACTION_SEND:
					if (mActionListener != null) {
						hideInput();
						mActionListener.onSendAction(ourView);
						return true;
					}
					if (ourView.isSingleLine()) {
						hideInput();
						return true;
					}
					return false;
				}
			}
			return false;
		case TextInputConnector.INPUT_COPY:
			return true;
		case TextInputConnector.INPUT_COPYURL:
			return true;
		case TextInputConnector.INPUT_SWITHINPUT:
			return true;
		case TextInputConnector.INPUT_PASTE:
			return true;
		default:
			if (mCursorMove == null) {
				return false;
			}

		case TextInputConnector.INPUT_MOVE_SHIF_DOWN:
			if (ourView.isTextSelectable()) {
				handle = mCursorMove.moveDown(mCursorDevicer, ourView, true);
				break;
			}
		case TextInputConnector.INPUT_MOVE_DOWN:
			handle = mCursorMove.moveDown(mCursorDevicer, ourView, false);
			break;
		case TextInputConnector.INPUT_MOVE_SHIF_UP:
			if (ourView.isTextSelectable()) {
				handle = mCursorMove.moveUp(mCursorDevicer, ourView, true);
				break;
			}
		case TextInputConnector.INPUT_MOVE_UP:
			handle = mCursorMove.moveUp(mCursorDevicer, ourView, false);
			break;
		case TextInputConnector.INPUT_MOVE_SHIF_LEFT:
			if (ourView.isTextSelectable()) {
				handle = mCursorMove.moveLeft(mCursorDevicer, ourView, true);
				break;
			}
		case TextInputConnector.INPUT_MOVE_LEFT:
			handle = mCursorMove.moveLeft(mCursorDevicer, ourView, false);
			break;
		case TextInputConnector.INPUT_MOVE_SHIF_RIGHT:
			if (ourView.isTextSelectable()) {
				handle = mCursorMove.moveRight(mCursorDevicer, ourView, true);
				break;
			}
		case TextInputConnector.INPUT_MOVE_RIGHT:
			handle = mCursorMove.moveRight(mCursorDevicer, ourView, false);
			break;
		}
		if (!handle) {
			ourView.invalidate();
		}
		ourView.updateCursorToVisibileScreen();
		return handle;
		// return ourView.onKeyPreIme(code, new KeyEvent(INPUT_EVENT, code));
	}

	private void hideInput() {
		InputMethodManager imm = (InputMethodManager) ourView.getContext()
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		imm.hideSoftInputFromWindow(ourView.getWindowToken(), 0);
	}

	@Override
	public boolean beginBatchEdit() {
		if (hasBatchBuffer()) {
			if (mBatchString == null) {
				mBatchString = new StringBuilder();
			}
		}
		return isBatch = true;
	}

	protected boolean hasBatchBuffer() {
		return true;
	}

	protected boolean isRepeatBatchString() {
		return false;
	}

	@Override
	public boolean endBatchEdit() {
		if (mBatchString != null) {
			if (mBatchString.length() > 0) {
				commitText(getSelectStart(), getSelectEnd(), mBatchString);
				mBatchString.setLength(0);
			}
			if (!isRepeatBatchString()) {
				mBatchString = null;
			}
		}
		isBatch = false;
		return true;
	}

	@Override
	public boolean sendKeyEvent(KeyEvent event) {
		int action = event.getAction();
		int key = event.getKeyCode();
		switch (action) {
		case KeyEvent.ACTION_DOWN:
			switch (key) {
			case KeyEvent.KEYCODE_SHIFT_LEFT:
			case KeyEvent.KEYCODE_SHIFT_RIGHT:
				setShift(true);
				return true;
			}
			if (onKeyDown(key)) {
				return true;
			}
			return ourView.onKeyDown(key, event);
		case KeyEvent.ACTION_UP:
			switch (key) {
			case KeyEvent.KEYCODE_SHIFT_LEFT:
			case KeyEvent.KEYCODE_SHIFT_RIGHT:
				setShift(false);
				return true;
			}
			if (onKeyUp(key)) {
				return true;
			}
			break;
		case KeyEvent.ACTION_MULTIPLE:
			String keyChar = event.getCharacters();
			if (keyChar != null) {
				commitText(keyChar, getSelectEnd());
				return true;
			}
			break;
		}
		return false;
	}

	protected boolean onKeyDown(int key) {
		return false;
	}

	protected boolean onKeyUp(int key) {
		int selectStart = getSelectStart();
		int selectEnd = getSelectEnd();
		switch (key) {
		case KeyEvent.KEYCODE_DEL:
			deleteSelect(selectStart, selectEnd);
			break;
		case KeyEvent.KEYCODE_ENTER:
			if (send(INPUT_ENTER)) {
				return true;
			}
			commitText(selectStart, selectEnd, "\n");
			break;
		case KeyEvent.KEYCODE_DPAD_RIGHT:
			if (isShift()) {
				send(INPUT_MOVE_SHIF_RIGHT);
			} else {
				send(INPUT_MOVE_RIGHT);
			}
			break;
		case KeyEvent.KEYCODE_DPAD_LEFT:
			if (isShift()) {
				send(INPUT_MOVE_SHIF_LEFT);
			} else {
				send(INPUT_MOVE_LEFT);
			}
			break;
		case KeyEvent.KEYCODE_DPAD_DOWN:
			if (isShift()) {
				send(INPUT_MOVE_SHIF_DOWN);
			} else {
				send(INPUT_MOVE_DOWN);
			}
			break;
		case KeyEvent.KEYCODE_DPAD_UP:
			if (isShift()) {
				send(INPUT_MOVE_SHIF_UP);
			} else {
				send(INPUT_MOVE_UP);
			}
			break;
		case KeyEvent.KEYCODE_MOVE_END:
			setSelectToEditor(length());
			break;
		case KeyEvent.KEYCODE_MOVE_HOME:
			setSelectToEditor(0);
			break;
		default:
			String code = getKeyCodeToUnicodeString(key);
			if (code == null) {
				return false;
			}
			commitText(selectStart, selectEnd, code);
		}
		return true;
	}

	/**
	 * Îñ±Ø½«selectÆðµã»¹ÔÖ®ºó,ÔÙÀ´ÐÞ¸ÄText
	 *
	 * @param selectStart
	 * @param selectEnd
	 * @param text
	 */
	protected void commitText(int selectStart, int selectEnd, CharSequence text) {
		if (selectStart == selectEnd) {
			insert(selectEnd, text);
		} else if (selectEnd < selectStart) {
			setSelectToEditor(selectEnd);
			replace(selectEnd, selectStart, text, 0, text.length());
			setSelectToEditor(selectEnd + text.length());
		} else {
			setSelectToEditor(selectStart);
			replace(selectStart, selectEnd, text, 0, text.length());
			setSelectToEditor(selectStart + text.length());
		}
	}

	/**
	 * @deprecated ΪÁ˸ü¼Ó¾«×¼µÄÓα괦Àí,ÒѾ·ÏÆú
	 * @see FormatLayout#moveLeft(com.maizer.text.cursor.CursorDevicer,
	 *      com.maizer.textview.TextScroller, boolean)
	 */
	@Deprecated
	protected void moveLeft(int selectStart, int selectEnd) {
		if (isShift()) {
			if (selectEnd > 0) {
				if (selectEnd > 1) {
					char c = getChar(selectEnd - 2);
					if (TextAreaLayout.isEmojiEnable(c)) {
						int count = Character.charCount(Character.codePointAt(getText(), selectEnd - 2));
						if (count > 1) {
							setSelectToEditor(selectStart, selectEnd - count);
							return;
						}
					}
				}
				setSelectToEditor(selectStart, selectEnd - 1);
			}
		} else if (selectEnd != selectStart) {
			setSelectToEditor(selectStart);
		} else if (selectEnd > 0) {
			if (selectEnd > 1) {
				char c = getChar(selectEnd - 2);
				if (TextAreaLayout.isEmojiEnable(c)) {
					int count = Character.charCount(Character.codePointAt(getText(), selectEnd - 2));
					if (count > 1) {
						setSelectToEditor(selectEnd - count);
						return;
					}
				}
			}
			setSelectToEditor(selectEnd - 1);
		}
	}

	@Deprecated
	protected void moveRight(int selectStart, int selectEnd) {
		if (isShift()) {
			if (selectEnd < length()) {
				if (selectEnd < length() - 1) {
					char c = getChar(selectEnd);
					if (TextAreaLayout.isEmojiEnable(c)) {
						int count = Character.charCount(Character.codePointAt(getText(), selectEnd));
						if (count > 1) {
							setSelectToEditor(selectStart, selectEnd + count);
							return;
						}
					}
				}
				setSelectToEditor(selectStart, selectEnd + 1);
			}
		} else if (selectEnd != selectStart) {
			setSelectToEditor(selectEnd);
		} else {
			if (selectEnd < length()) {
				if (selectEnd < length() - 1) {
					char c = getChar(selectEnd);
					if (TextAreaLayout.isEmojiEnable(c)) {
						int count = Character.charCount(Character.codePointAt(getText(), selectEnd));
						if (count > 1) {
							setSelectToEditor(selectEnd + count);
							return;
						}
					}
				}
				setSelectToEditor(selectEnd + 1);
			}
		}
	}

	/**
	 * Îñ±Ø½«selectÆðµã¸üÕýÖ®ºó,ÔÙÀ´ÐÞ¸ÄText
	 *
	 */
	protected void deleteSelect(int selectStart, int selectEnd) {

		if (selectStart == selectEnd) {
			if (selectEnd > 0) {
				if (selectEnd > 1) {
					char c = getChar(selectEnd - 2);
					if (TextAreaLayout.isEmojiEnable(c)) {
						int count = Character.charCount(Character.codePointAt(getText(), selectEnd - 2));
						if (count > 1) {
							delete(selectEnd - count, selectEnd);
							return;
						}
					}
				}
				delete(selectEnd - 1, selectEnd);
			}
		} else {
			if (selectStart < selectEnd) {
				setSelectToEditor(selectStart);
				delete(selectStart, selectEnd);
			} else {
				setSelectToEditor(selectEnd);
				delete(selectEnd, selectStart);
			}
		}
	}

	@Override
	public boolean reportFullscreenMode(boolean enabled) {
		Log.e(TAG, "refull");
		return false;
	}

	@Override
	public boolean performPrivateCommand(String action, Bundle data) {
		Log.e(TAG, "performprivatecom");
		return true;
	}

	@SuppressLint("Override")
	public boolean requestCursorUpdates(int cursorUpdateMode) {
		Log.e(TAG, "requestCursorUpdates");
		return false;
	}

	public int getKeyCodeToUnicode(int key) {
		if (KeyEvent.KEYCODE_0 <= key && KeyEvent.KEYCODE_9 >= key) {
			return ('0' + (key - KeyEvent.KEYCODE_0));
		} else if (KeyEvent.KEYCODE_A <= key && KeyEvent.KEYCODE_Z >= key) {
			if (isShift()) {
				return ('A' + (key - KeyEvent.KEYCODE_A));
			}
			return ('a' + (key - KeyEvent.KEYCODE_A));
		} else if (KeyEvent.KEYCODE_STAR == key) {
			return '*';
		} else if (KeyEvent.KEYCODE_POUND == key) {
			return '#';
		} else if (KeyEvent.KEYCODE_COMMA == key) {
			return ',';
		} else if (KeyEvent.KEYCODE_PERIOD == key) {
			return '.';
		} else if (KeyEvent.KEYCODE_SPACE == key) {
			return ' ';
		} else if (KeyEvent.KEYCODE_TAB == key) {
			return '\t';
		}
		return 0;
	}

	public String getKeyCodeToUnicodeString(int key) {
		if (KeyEvent.KEYCODE_11 == key) {
			return "11";
		} else if (KeyEvent.KEYCODE_12 == key) {
			return "12";
		}
		int code = getKeyCodeToUnicode(key);
		if (code == 0) {
			return null;
		}
		return (char) code + "";
	}

}


text:
package com.mendeley.api.exceptions;

/**
 * Exception that is thrown when a paged request has already returned the final page.
 */
public class NoMorePagesException extends MendeleyException {
	public NoMorePagesException() {
		super("No more pages available");
	}
}


text:
package com.connectsdk.service.capability;

import org.json.JSONObject;

import com.connectsdk.core.AppInfo;
import com.connectsdk.service.capability.listeners.ResponseListener;

public interface ToastControl extends CapabilityMethods {
	public final static String Any = "ToastControl.Any";

	public final static String Show_Toast = "ToastControl.Show";
	public final static String Show_Clickable_Toast_App = "ToastControl.Show.Clickable.App";
	public final static String Show_Clickable_Toast_App_Params = "ToastControl.Show.Clickable.App.Params";
	public final static String Show_Clickable_Toast_URL = "ToastControl.Show.Clickable.URL";

	public final static String[] Capabilities = {
	    Show_Toast,
	    Show_Clickable_Toast_App,
	    Show_Clickable_Toast_App_Params,
	    Show_Clickable_Toast_URL
	};

	public ToastControl getToastControl();
	public CapabilityPriorityLevel getToastControlCapabilityLevel();

	public void showToast(String message, ResponseListener<Object> listener);
	public void showToast(String message, String iconData, String iconExtension, ResponseListener<Object> listener);

	public void showClickableToastForApp(String message, AppInfo appInfo, JSONObject params, ResponseListener<Object> listener);
	public void showClickableToastForApp(String message, AppInfo appInfo, JSONObject params, String iconData, String iconExtension, ResponseListener<Object> listener);

	public void showClickableToastForURL(String message, String url, ResponseListener<Object> listener);
	public void showClickableToastForURL(String message, String url, String iconData, String iconExtension, ResponseListener<Object> listener);
}


text:
package other;

public class FindMyArray implements FindArray {
    @Override
    public int findArray(int[] array, int[] subArray) {
        if (array == null
                || subArray == null
                || array.length < subArray.length) {
            return -1;
        }
        int startingIndex = -1;

        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j < subArray.length; j++) {
                if (array[i] == subArray[j]) {
                    if (startingIndex == -1) {
                        startingIndex = i;
                        break;
                    }

                    //no need to check leftovers because starting index is not found going to the next i
//                    if (j > 0 && startingIndex == -1) {
//                        break;s such as 'printResu
//                    }s such as 'printResu

                    //element found and going to the last one
//                    if (array.length - i <= subArray.length
//                            && i - startingIndex > 1
//                            ) {
//                        startingIndex = i;
//                    }

                    //element found second time
                   // if (startingIndex >= 0) {
                        if (array.length - i >= subArray.length) {
                            if (i - startingIndex > 1 && j == 0) {
                                startingIndex = i;
                            }
                        }
                  //  }
                }

                //length is similar or leftover length is similar and we skip one element- no way to find
                if (array.length - i < j && array[i] != subArray[j]) {
                    return -1;
                }
//                if (startingIndex >= 0  // if j == 1 and index not found next i
//                        && array[i + j] == subArray[j]) {
//                    if (i + j - startingIndex >= 1) {
//                        startingIndex = i + j;
//                    }
//                }
            }
        }
        return startingIndex;
    }
}


text:
import {DebugElement, Predicate, Type} from '@angular/core';
import {getDOM} from '../../dom/dom_adapter';

/**
 * Predicates for use with {@link DebugElement}'s query functions.
 *
 * @publicApi
 */
export class By {
  /**
   * Match all elements.
   *
   * @usageNotes
   * ### Example
   *
   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_all'}
   */
  static all(): Predicate<DebugElement> { return (debugElement) => true; }

  /**
   * Match elements by the given CSS selector.
   *
   * @usageNotes
   * ### Example
   *
   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_css'}
   */
  static css(selector: string): Predicate<DebugElement> {
    return (debugElement) => {
      return debugElement.nativeElement != null ?
          getDOM().elementMatches(debugElement.nativeElement, selector) :
          false;
    };
  }

  /**
   * Match elements that have the given directive present.
   *
   * @usageNotes
   * ### Example
   *
   * {@example platform-browser/dom/debug/ts/by/by.ts region='by_directive'}
   */
  static directive(type: Type<any>): Predicate<DebugElement> {
    return (debugElement) => debugElement.providerTokens !.indexOf(type) !== -1;
  }
}


text:
<?php

namespace MwBundle\Service;

use AppBundle\Doctrine\SqlExtractor;
use AppBundle\Entity\Klant;
use AppBundle\Filter\FilterInterface;
use AppBundle\Service\AbstractDao;
use MwBundle\Entity\Aanmelding;

class KlantDao extends AbstractDao implements KlantDaoInterface
{
    protected $paginationOptions = [
        'defaultSortFieldName' => 'klant.achternaam',
        'defaultSortDirection' => 'asc',
        'sortFieldWhitelist' => [
            'klant.id',
            'klant.achternaam',
            'klant.geboortedatum',
            'geslacht.volledig',
            'medewerker.voornaam',
            'maatschappelijkWerker.voornaam',
            'verslag',
            'gebruikersruimte.naam',
            'laatsteIntakeLocatie.naam',
            'klant.intakedatum',
            'datumLaatsteVerslag',
            'aantalVerslagen',
        ],
//        'wrap-queries' => true, // because of HAVING clause in filter
    ];

    protected $class = Klant::class;

    protected $alias = 'klant';

    public function findAll($page = null, FilterInterface $filter = null)
    {
        /**
         * @var KlantFilter $filter
         */
        $filter;

        $builder = $this->repository->createQueryBuilder($this->alias);
        $builder
            ->select('klant, laatsteIntake, gebruikersruimte')
            ->addSelect('verslag.datum AS datumLaatsteVerslag')
            ->addSelect('locatie.naam AS laatsteVerslagLocatie')
            ->addSelect('COUNT(DISTINCT verslag.id) AS aantalVerslagen')

            ;
//        if($filter->isDirty()) //rrrright. dit mag weg?
//        {
//            $builder
//                ->leftJoin($this->alias.'.verslagen', 'verslag')
//                ->leftJoin('verslag.medewerker','medewerker');
//        }
//        else
//        {
            $builder
                ->join($this->alias.'.verslagen', 'verslag')
                ->join('verslag.medewerker','medewerker');
//        }
        $builder
            ->leftJoin('klant.maatschappelijkWerker','maatschappelijkWerker')
            ->leftJoin($this->alias.'.verslagen','v2','WITH','verslag.klant = v2.klant AND (verslag.datum < v2.datum OR (verslag.datum = v2.datum AND verslag.id < v2.id))')
            ->where('v2.id IS NULL')
            ->leftJoin($this->alias.'.geslacht', 'geslacht')
//            ->addSelect('\'2020-07-01\' AS datumLaatsteVerslag')
//            ->addSelect('1 AS aantalVerslagen')
//            ->leftJoin($this->alias.'.huidigeStatus', 'status')
            ->leftJoin($this->alias.'.intakes', 'intake')
            ->leftJoin($this->alias.'.laatsteIntake', 'laatsteIntake')
            ->leftJoin('laatsteIntake.intakelocatie', 'laatsteIntakeLocatie')
            ->leftJoin('verslag.locatie','locatie')
            ->leftJoin($this->alias.'.huidigeMwStatus', 'huidigeMwStatus')
            ->leftJoin('laatsteIntake.gebruikersruimte', 'gebruikersruimte')
            ->groupBy('klant.achternaam, klant.id')
            ;

        if ($filter) {
            $filter->applyTo($builder);
        }

        $sql = SqlExtractor::getFullSQL($builder->getQuery());
        if ($page) {
            /**
             * Vanwege de vele left joins in deze query is de total count niet te optimaliseren (door mij) onder de <900ms.
             * Dat vind ik lang. Temeer omdat in veel gevallen die total count niet bijster interessant is.
             *
             * In de default configuratie van het filter wordt daarom de total count niet geteld. Dat scheelt een eerste snelle klik.
             * Zodra je dan filtert gaat het sowieso sneller en wordt het juiste getal getoont.
             *
             */
            $dql = $builder->getDQL();
            $params = $builder->getParameters();
//            $sql = $builder->getQuery()->getSQL();

            $count = 11111;
            if($filter->isDirty())
            {
                $builder->resetDQLPart("select");
                $builder->select("klant.id");//select only one column for count query.

                $countQuery = $builder->getQuery();
                $fullSql = SqlExtractor::getFullSQL($countQuery);//including bound parameters.

                $countSql = "SELECT COUNT(*) AS count FROM (".$fullSql.") tmp"; //wrap into subquery.
                $countStmt = $this->entityManager->getConnection()->prepare($countSql);
                $countStmt->execute();
                $count = $countStmt->fetchColumn(0);
            }
            $query = $this->entityManager->createQuery($dql)->setHint('knp_paginator.count', $count);

            $query->setParameters($params);
            return $this->paginator->paginate($query, $page, $this->itemsPerPage,$this->paginationOptions);
        }

        return $builder->getQuery()->getResult();
    }

    public function countResultatenPerLocatie($page = null, FilterInterface $filter = null)
    {
        $builder = $this->repository->createQueryBuilder('klant')
            /**
             * SELECT DISTINCT (klanten.id), mw_dossier_statussen.class, mw_resultaten.naam FROM klanten LEFT JOIN verslagen ON verslagen.klant_id = klanten.id
            LEFT JOIN mw_dossier_statussen ON mw_dossier_statussen.id = klanten.huidigeMwStatus_id
            LEFT JOIN mw_afsluiting_resultaat ON mw_afsluiting_resultaat.afsluiting_id = mw_dossier_statussen.id
            INNER JOIN mw_resultaten ON mw_resultaten.id = mw_afsluiting_resultaat.resultaat_id
            WHERE verslagen.id IS NOT NULL
            AND mw_dossier_statussen.class IN ('Afsluiting')
             */
        ;

        if ($filter) {
            $filter->applyTo($builder);
        }

        if ($page) {
            return $this->paginator->paginate($builder, $page, $this->itemsPerPage, $this->paginationOptions);
        }

        return $builder->getQuery()->getResult();
    }

    public function create(Klant $entity)
    {
        return parent::doCreate($entity);
    }

    public function update(Klant $entity)
    {
        $this->doUpdate($entity);
    }

    public function delete(Klant $entity)
    {
        $this->doDelete($entity);
    }

}


text:
class FakeU2fDevice
  def initialize(page)
    @page = page
  end

  def respond_to_u2f_registration
    app_id = @page.evaluate_script('gon.u2f.app_id')
    challenges = @page.evaluate_script('gon.u2f.challenges')

    json_response = u2f_device(app_id).register_response(challenges[0])

    @page.execute_script("
    u2f.register = function(appId, registerRequests, signRequests, callback) {
      callback(#{json_response});
    };
    ")
  end

  def respond_to_u2f_authentication
    app_id = @page.evaluate_script('gon.u2f.app_id')
    challenge = @page.evaluate_script('gon.u2f.challenge')
    json_response = u2f_device(app_id).sign_response(challenge)

    @page.execute_script("
    u2f.sign = function(appId, challenges, signRequests, callback) {
      callback(#{json_response});
    };
    ")
  end

  private

  def u2f_device(app_id)
    @u2f_device ||= U2F::FakeU2F.new(app_id)
  end
end


text:
This guide and the accompanying doxygen documentation are targetted at
developpers that wish to design their own switch model using the building blocks
exposed by bmv2. We have not documented every single method in doxygen; instead
only the public methods which can help you design and implement your own model
have been documented and are visible here.

If you are not yet familiar with bmv2 (if you have never used bmv2 before), you
should be starting with the [bmv2 README]
(https://github.com/p4lang/behavioral-model).

The bmv2 code already comes with 3 example targets: [simple_router]
(https://github.com/p4lang/behavioral-model/tree/master/targets/simple_router),
[l2_switch]
(https://github.com/p4lang/behavioral-model/tree/master/targets/l2_switch) and
[simple_switch]
(https://github.com/p4lang/behavioral-model/tree/master/targets/simple_switch).
simple_router is the smallest and simplest one, and I suggest starting with
it. l2_switch introduces some additional complexity by including a packet
replication engine (to support multicast). simple_switch is the standard P4
target and although it includes a lot of functionality, the code is still
relatively small and straightforward.

As the bmv2 code becomes more stable, we intend to improve this documentation
and include a step-by-step guide on how to design and implement your target
using bmv2. I believe that a step-by-step guide recreating the implementation of
the l2_switch target would be most useful.

## FAQ

TODO


text:
ACCEPTED

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

#### Published in
null

#### Original name
Bauhinia riedelii Baker

### Remarks
null


text:
#include "ReflectiveDLLInjection.h"

typedef HMODULE (WINAPI * LOADLIBRARYA)( LPCSTR );
typedef FARPROC (WINAPI * GETPROCADDRESS)( HMODULE, LPCSTR );
typedef LPVOID  (WINAPI * VIRTUALALLOC)( LPVOID, SIZE_T, DWORD, DWORD );

#define KERNEL32DLL_HASH		0x6A4ABC5B
#define LOADLIBRARYA_HASH		0xEC0E4E8E
#define GETPROCADDRESS_HASH		0x7C0DFCAA
#define VIRTUALALLOC_HASH		0x91AFCA54

#define HASH_KEY	13
//===============================================================================================//
#pragma intrinsic( _rotr )

__forceinline DWORD ror( DWORD d )
{
	return _rotr( d, HASH_KEY );
}

__forceinline DWORD hash( char * c )
{
    register DWORD h = 0;
	do
	{
		h = ror( h );
        h += *c;
	} while( *++c );

    return h;
}
//===============================================================================================//
typedef struct _UNICODE_STR
{
  USHORT Length;
  USHORT MaximumLength;
  PWSTR pBuffer;
} UNICODE_STR, *PUNICODE_STR;

// WinDbg> dt -v ntdll!_LDR_DATA_TABLE_ENTRY
//__declspec( align(8) )
typedef struct _LDR_DATA_TABLE_ENTRY
{
	//LIST_ENTRY InLoadOrderLinks; // As we search from PPEB_LDR_DATA->InMemoryOrderModuleList we dont use the first entry.
	LIST_ENTRY InMemoryOrderModuleList;
	LIST_ENTRY InInitializationOrderModuleList;
	PVOID DllBase;
	PVOID EntryPoint;
	ULONG SizeOfImage;
	UNICODE_STR FullDllName;
	UNICODE_STR BaseDllName;
	ULONG Flags;
	SHORT LoadCount;
	SHORT TlsIndex;
	LIST_ENTRY HashTableEntry;
	ULONG TimeDateStamp;
} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;

// WinDbg> dt -v ntdll!_PEB_LDR_DATA
typedef struct _PEB_LDR_DATA //, 7 elements, 0x28 bytes
{
   DWORD dwLength;
   DWORD dwInitialized;
   LPVOID lpSsHandle;
   LIST_ENTRY InLoadOrderModuleList;
   LIST_ENTRY InMemoryOrderModuleList;
   LIST_ENTRY InInitializationOrderModuleList;
   LPVOID lpEntryInProgress;
} PEB_LDR_DATA, * PPEB_LDR_DATA;

// WinDbg> dt -v ntdll!_PEB_FREE_BLOCK
typedef struct _PEB_FREE_BLOCK // 2 elements, 0x8 bytes
{
   struct _PEB_FREE_BLOCK * pNext;
   DWORD dwSize;
} PEB_FREE_BLOCK, * PPEB_FREE_BLOCK;

// struct _PEB is defined in Winternl.h but it is incomplete
// WinDbg> dt -v ntdll!_PEB
typedef struct __PEB // 65 elements, 0x210 bytes
{
   BYTE bInheritedAddressSpace;
   BYTE bReadImageFileExecOptions;
   BYTE bBeingDebugged;
   BYTE bSpareBool;
   LPVOID lpMutant;
   LPVOID lpImageBaseAddress;
   PPEB_LDR_DATA pLdr;
   LPVOID lpProcessParameters;
   LPVOID lpSubSystemData;
   LPVOID lpProcessHeap;
   PRTL_CRITICAL_SECTION pFastPebLock;
   LPVOID lpFastPebLockRoutine;
   LPVOID lpFastPebUnlockRoutine;
   DWORD dwEnvironmentUpdateCount;
   LPVOID lpKernelCallbackTable;
   DWORD dwSystemReserved;
   DWORD dwAtlThunkSListPtr32;
   PPEB_FREE_BLOCK pFreeList;
   DWORD dwTlsExpansionCounter;
   LPVOID lpTlsBitmap;
   DWORD dwTlsBitmapBits[2];
   LPVOID lpReadOnlySharedMemoryBase;
   LPVOID lpReadOnlySharedMemoryHeap;
   LPVOID lpReadOnlyStaticServerData;
   LPVOID lpAnsiCodePageData;
   LPVOID lpOemCodePageData;
   LPVOID lpUnicodeCaseTableData;
   DWORD dwNumberOfProcessors;
   DWORD dwNtGlobalFlag;
   LARGE_INTEGER liCriticalSectionTimeout;
   DWORD dwHeapSegmentReserve;
   DWORD dwHeapSegmentCommit;
   DWORD dwHeapDeCommitTotalFreeThreshold;
   DWORD dwHeapDeCommitFreeBlockThreshold;
   DWORD dwNumberOfHeaps;
   DWORD dwMaximumNumberOfHeaps;
   LPVOID lpProcessHeaps;
   LPVOID lpGdiSharedHandleTable;
   LPVOID lpProcessStarterHelper;
   DWORD dwGdiDCAttributeList;
   LPVOID lpLoaderLock;
   DWORD dwOSMajorVersion;
   DWORD dwOSMinorVersion;
   WORD wOSBuildNumber;
   WORD wOSCSDVersion;
   DWORD dwOSPlatformId;
   DWORD dwImageSubsystem;
   DWORD dwImageSubsystemMajorVersion;
   DWORD dwImageSubsystemMinorVersion;
   DWORD dwImageProcessAffinityMask;
   DWORD dwGdiHandleBuffer[34];
   LPVOID lpPostProcessInitRoutine;
   LPVOID lpTlsExpansionBitmap;
   DWORD dwTlsExpansionBitmapBits[32];
   DWORD dwSessionId;
   ULARGE_INTEGER liAppCompatFlags;
   ULARGE_INTEGER liAppCompatFlagsUser;
   LPVOID lppShimData;
   LPVOID lpAppCompatInfo;
   UNICODE_STR usCSDVersion;
   LPVOID lpActivationContextData;
   LPVOID lpProcessAssemblyStorageMap;
   LPVOID lpSystemDefaultActivationContextData;
   LPVOID lpSystemAssemblyStorageMap;
   DWORD dwMinimumStackCommit;
} _PEB, * _PPEB;

typedef struct
{
	WORD	offset:12;
	WORD	type:4;
} IMAGE_RELOC, *PIMAGE_RELOC;
//===============================================================================================//
#endif
//===============================================================================================//


text:
package org.jboss.test.clusterbench.web.debug;

import java.io.IOException;

import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import org.jboss.test.clusterbench.common.ClusterBenchConstants;

/**
 * @author Tommasso Borgato
 * @author Radoslav Husar
 */
@WebServlet(name = "JBossNodeNameServlet", urlPatterns = { "/jboss-node-name" })
public class JBossNodeNameServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {

        // Create session?
        if (req.getParameter(ClusterBenchConstants.CREATE) != null) {
            req.getSession();
        }

        String jbossNodeName = System.getProperty("jboss.node.name");
        resp.getWriter().print(jbossNodeName);
    }
}


text:
<?php

if ($_SERVER['APPLICATION_ENV'] == 'development') {
    error_reporting(E_ALL ^ E_NOTICE);
    ini_set('display_errors', 1);
}

/**
 * This makes our life easier when dealing with paths. Everything is relative
 * to the application root now.
 */
chdir(dirname(__DIR__));
define('PUBLIC_DIR', __DIR__);
define('COMMON_FUNCTIONS_DIR', __DIR__ . '/../module/Application/src/Application/My/CommonFunctions/');

// Decline static file requests back to the PHP built-in webserver
if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
    return false;
}

// Setup autoloading
require 'init_autoloader.php';

// Run the application!
Zend\Mvc\Application::init(require 'config/application.config.php')->run();