text:
import React from 'react';
import ReactFiberReconciler from 'react-reconciler';
import * as ReactDOMFrameScheduling from 'shared/ReactDOMFrameScheduling';
import Mode from 'art/modes/current';
import FastNoSideEffects from 'art/modes/fast-noSideEffects';
import Transform from 'art/core/transform';
import invariant from 'fbjs/lib/invariant';
import emptyObject from 'fbjs/lib/emptyObject';

Mode.setCurrent(
  // Change to 'art/modes/dom' for easier debugging via SVG
  FastNoSideEffects,
);

const pooledTransform = new Transform();

const EVENT_TYPES = {
  onClick: 'click',
  onMouseMove: 'mousemove',
  onMouseOver: 'mouseover',
  onMouseOut: 'mouseout',
  onMouseUp: 'mouseup',
  onMouseDown: 'mousedown',
};

const TYPES = {
  CLIPPING_RECTANGLE: 'ClippingRectangle',
  GROUP: 'Group',
  SHAPE: 'Shape',
  TEXT: 'Text',
};

const UPDATE_SIGNAL = {};

/** Helper Methods */

function addEventListeners(instance, type, listener) {
  // We need to explicitly unregister before unmount.
  // For this reason we need to track subscriptions.
  if (!instance._listeners) {
    instance._listeners = {};
    instance._subscriptions = {};
  }

  instance._listeners[type] = listener;

  if (listener) {
    if (!instance._subscriptions[type]) {
      instance._subscriptions[type] = instance.subscribe(
        type,
        createEventHandler(instance),
        instance,
      );
    }
  } else {
    if (instance._subscriptions[type]) {
      instance._subscriptions[type]();
      delete instance._subscriptions[type];
    }
  }
}

function childrenAsString(children) {
  if (!children) {
    return '';
  } else if (typeof children === 'string') {
    return children;
  } else if (children.length) {
    return children.join('');
  } else {
    return '';
  }
}

function createEventHandler(instance) {
  return function handleEvent(event) {
    const listener = instance._listeners[event.type];

    if (!listener) {
      // Noop
    } else if (typeof listener === 'function') {
      listener.call(instance, event);
    } else if (listener.handleEvent) {
      listener.handleEvent(event);
    }
  };
}

function destroyEventListeners(instance) {
  if (instance._subscriptions) {
    for (let type in instance._subscriptions) {
      instance._subscriptions[type]();
    }
  }

  instance._subscriptions = null;
  instance._listeners = null;
}

function getScaleX(props) {
  if (props.scaleX != null) {
    return props.scaleX;
  } else if (props.scale != null) {
    return props.scale;
  } else {
    return 1;
  }
}

function getScaleY(props) {
  if (props.scaleY != null) {
    return props.scaleY;
  } else if (props.scale != null) {
    return props.scale;
  } else {
    return 1;
  }
}

function isSameFont(oldFont, newFont) {
  if (oldFont === newFont) {
    return true;
  } else if (typeof newFont === 'string' || typeof oldFont === 'string') {
    return false;
  } else {
    return (
      newFont.fontSize === oldFont.fontSize &&
      newFont.fontStyle === oldFont.fontStyle &&
      newFont.fontVariant === oldFont.fontVariant &&
      newFont.fontWeight === oldFont.fontWeight &&
      newFont.fontFamily === oldFont.fontFamily
    );
  }
}

/** Render Methods */

function applyClippingRectangleProps(instance, props, prevProps = {}) {
  applyNodeProps(instance, props, prevProps);

  instance.width = props.width;
  instance.height = props.height;
}

function applyGroupProps(instance, props, prevProps = {}) {
  applyNodeProps(instance, props, prevProps);

  instance.width = props.width;
  instance.height = props.height;
}

function applyNodeProps(instance, props, prevProps = {}) {
  const scaleX = getScaleX(props);
  const scaleY = getScaleY(props);

  pooledTransform
    .transformTo(1, 0, 0, 1, 0, 0)
    .move(props.x || 0, props.y || 0)
    .rotate(props.rotation || 0, props.originX, props.originY)
    .scale(scaleX, scaleY, props.originX, props.originY);

  if (props.transform != null) {
    pooledTransform.transform(props.transform);
  }

  if (
    instance.xx !== pooledTransform.xx ||
    instance.yx !== pooledTransform.yx ||
    instance.xy !== pooledTransform.xy ||
    instance.yy !== pooledTransform.yy ||
    instance.x !== pooledTransform.x ||
    instance.y !== pooledTransform.y
  ) {
    instance.transformTo(pooledTransform);
  }

  if (props.cursor !== prevProps.cursor || props.title !== prevProps.title) {
    instance.indicate(props.cursor, props.title);
  }

  if (instance.blend && props.opacity !== prevProps.opacity) {
    instance.blend(props.opacity == null ? 1 : props.opacity);
  }

  if (props.visible !== prevProps.visible) {
    if (props.visible == null || props.visible) {
      instance.show();
    } else {
      instance.hide();
    }
  }

  for (let type in EVENT_TYPES) {
    addEventListeners(instance, EVENT_TYPES[type], props[type]);
  }
}

function applyRenderableNodeProps(instance, props, prevProps = {}) {
  applyNodeProps(instance, props, prevProps);

  if (prevProps.fill !== props.fill) {
    if (props.fill && props.fill.applyFill) {
      props.fill.applyFill(instance);
    } else {
      instance.fill(props.fill);
    }
  }
  if (
    prevProps.stroke !== props.stroke ||
    prevProps.strokeWidth !== props.strokeWidth ||
    prevProps.strokeCap !== props.strokeCap ||
    prevProps.strokeJoin !== props.strokeJoin ||
    // TODO: Consider deep check of stokeDash; may benefit VML in IE.
    prevProps.strokeDash !== props.strokeDash
  ) {
    instance.stroke(
      props.stroke,
      props.strokeWidth,
      props.strokeCap,
      props.strokeJoin,
      props.strokeDash,
    );
  }
}

function applyShapeProps(instance, props, prevProps = {}) {
  applyRenderableNodeProps(instance, props, prevProps);

  const path = props.d || childrenAsString(props.children);

  const prevDelta = instance._prevDelta;
  const prevPath = instance._prevPath;

  if (
    path !== prevPath ||
    path.delta !== prevDelta ||
    prevProps.height !== props.height ||
    prevProps.width !== props.width
  ) {
    instance.draw(path, props.width, props.height);

    instance._prevDelta = path.delta;
    instance._prevPath = path;
  }
}

function applyTextProps(instance, props, prevProps = {}) {
  applyRenderableNodeProps(instance, props, prevProps);

  const string = props.children;

  if (
    instance._currentString !== string ||
    !isSameFont(props.font, prevProps.font) ||
    props.alignment !== prevProps.alignment ||
    props.path !== prevProps.path
  ) {
    instance.draw(string, props.font, props.alignment, props.path);

    instance._currentString = string;
  }
}

/** Declarative fill-type objects; API design not finalized */

const slice = Array.prototype.slice;

class LinearGradient {
  constructor(stops, x1, y1, x2, y2) {
    this._args = slice.call(arguments);
  }

  applyFill(node) {
    node.fillLinear.apply(node, this._args);
  }
}

class RadialGradient {
  constructor(stops, fx, fy, rx, ry, cx, cy) {
    this._args = slice.call(arguments);
  }

  applyFill(node) {
    node.fillRadial.apply(node, this._args);
  }
}

class Pattern {
  constructor(url, width, height, left, top) {
    this._args = slice.call(arguments);
  }

  applyFill(node) {
    node.fillImage.apply(node, this._args);
  }
}

/** React Components */

class Surface extends React.Component {
  componentDidMount() {
    const {height, width} = this.props;

    this._surface = Mode.Surface(+width, +height, this._tagRef);

    this._mountNode = ARTRenderer.createContainer(this._surface);
    ARTRenderer.updateContainer(this.props.children, this._mountNode, this);
  }

  componentDidUpdate(prevProps, prevState) {
    const props = this.props;

    if (props.height !== prevProps.height || props.width !== prevProps.width) {
      this._surface.resize(+props.width, +props.height);
    }

    ARTRenderer.updateContainer(this.props.children, this._mountNode, this);

    if (this._surface.render) {
      this._surface.render();
    }
  }

  componentWillUnmount() {
    ARTRenderer.updateContainer(null, this._mountNode, this);
  }

  render() {
    // This is going to be a placeholder because we don't know what it will
    // actually resolve to because ART may render canvas, vml or svg tags here.
    // We only allow a subset of properties since others might conflict with
    // ART's properties.
    const props = this.props;

    // TODO: ART's Canvas Mode overrides surface title and cursor
    const Tag = Mode.Surface.tagName;

    return (
      <Tag
        ref={ref => (this._tagRef = ref)}
        accessKey={props.accessKey}
        className={props.className}
        draggable={props.draggable}
        role={props.role}
        style={props.style}
        tabIndex={props.tabIndex}
        title={props.title}
      />
    );
  }
}

class Text extends React.Component {
  constructor(props) {
    super(props);
    // We allow reading these props. Ideally we could expose the Text node as
    // ref directly.
    ['height', 'width', 'x', 'y'].forEach(key => {
      Object.defineProperty(this, key, {
        get: function() {
          return this._text ? this._text[key] : undefined;
        },
      });
    });
  }
  render() {
    // This means you can't have children that render into strings...
    const T = TYPES.TEXT;
    return (
      <T {...this.props} ref={t => (this._text = t)}>
        {childrenAsString(this.props.children)}
      </T>
    );
  }
}

/** ART Renderer */

const ARTRenderer = ReactFiberReconciler({
  appendInitialChild(parentInstance, child) {
    if (typeof child === 'string') {
      // Noop for string children of Text (eg <Text>{'foo'}{'bar'}</Text>)
      invariant(false, 'Text children should already be flattened.');
      return;
    }

    child.inject(parentInstance);
  },

  createInstance(type, props, internalInstanceHandle) {
    let instance;

    switch (type) {
      case TYPES.CLIPPING_RECTANGLE:
        instance = Mode.ClippingRectangle();
        instance._applyProps = applyClippingRectangleProps;
        break;
      case TYPES.GROUP:
        instance = Mode.Group();
        instance._applyProps = applyGroupProps;
        break;
      case TYPES.SHAPE:
        instance = Mode.Shape();
        instance._applyProps = applyShapeProps;
        break;
      case TYPES.TEXT:
        instance = Mode.Text(
          props.children,
          props.font,
          props.alignment,
          props.path,
        );
        instance._applyProps = applyTextProps;
        break;
    }

    invariant(instance, 'ReactART does not support the type "%s"', type);

    instance._applyProps(instance, props);

    return instance;
  },

  createTextInstance(text, rootContainerInstance, internalInstanceHandle) {
    return text;
  },

  finalizeInitialChildren(domElement, type, props) {
    return false;
  },

  getPublicInstance(instance) {
    return instance;
  },

  prepareForCommit() {
    // Noop
  },

  prepareUpdate(domElement, type, oldProps, newProps) {
    return UPDATE_SIGNAL;
  },

  resetAfterCommit() {
    // Noop
  },

  resetTextContent(domElement) {
    // Noop
  },

  shouldDeprioritizeSubtree(type, props) {
    return false;
  },

  getRootHostContext() {
    return emptyObject;
  },

  getChildHostContext() {
    return emptyObject;
  },

  scheduleDeferredCallback: ReactDOMFrameScheduling.rIC,

  shouldSetTextContent(type, props) {
    return (
      typeof props.children === 'string' || typeof props.children === 'number'
    );
  },

  now: ReactDOMFrameScheduling.now,

  useSyncScheduling: true,

  mutation: {
    appendChild(parentInstance, child) {
      if (child.parentNode === parentInstance) {
        child.eject();
      }
      child.inject(parentInstance);
    },

    appendChildToContainer(parentInstance, child) {
      if (child.parentNode === parentInstance) {
        child.eject();
      }
      child.inject(parentInstance);
    },

    insertBefore(parentInstance, child, beforeChild) {
      invariant(
        child !== beforeChild,
        'ReactART: Can not insert node before itself',
      );
      child.injectBefore(beforeChild);
    },

    insertInContainerBefore(parentInstance, child, beforeChild) {
      invariant(
        child !== beforeChild,
        'ReactART: Can not insert node before itself',
      );
      child.injectBefore(beforeChild);
    },

    removeChild(parentInstance, child) {
      destroyEventListeners(child);
      child.eject();
    },

    removeChildFromContainer(parentInstance, child) {
      destroyEventListeners(child);
      child.eject();
    },

    commitTextUpdate(textInstance, oldText, newText) {
      // Noop
    },

    commitMount(instance, type, newProps) {
      // Noop
    },

    commitUpdate(instance, updatePayload, type, oldProps, newProps) {
      instance._applyProps(instance, newProps, oldProps);
    },
  },
});

/** API */

export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;
export const Group = TYPES.GROUP;
export const Shape = TYPES.SHAPE;
export const Path = Mode.Path;
export {LinearGradient, Pattern, RadialGradient, Surface, Text, Transform};


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<TITLE>Man page of SCHED_SETAFFINITY</TITLE>

SCHED_SETAFFINITY

Section: Linux Programmer's Manual (2)
Updated: 2014-08-19
Index
Return to Main Contents

NAME

sched_setaffinity, sched_getaffinity - set and get a thread's CPU affinity mask

SYNOPSIS

#define _GNU_SOURCE             /* See feature_test_macros(7) */
#include <sched.h>

int sched_setaffinity(pid_t pid, size_t cpusetsize,
                      const cpu_set_t *mask);

int sched_getaffinity(pid_t pid, size_t cpusetsize,
                      cpu_set_t *mask);

DESCRIPTION

A thread's CPU affinity mask determines the set of CPUs on which
it is eligible to run.
On a multiprocessor system, setting the CPU affinity mask
can be used to obtain performance benefits.
For example,
by dedicating one CPU to a particular thread
(i.e., setting the affinity mask of that thread to specify a single CPU,
and setting the affinity mask of all other threads to exclude that CPU),
it is possible to ensure maximum execution speed for that thread.
Restricting a thread to run on a single CPU also avoids
the performance cost caused by the cache invalidation that occurs
when a thread ceases to execute on one CPU and then
recommences execution on a different CPU.

A CPU affinity mask is represented by the
cpu_set_t

structure, a "CPU set", pointed to by
mask.

A set of macros for manipulating CPU sets is described in
CPU_SET(3).

sched_setaffinity()

sets the CPU affinity mask of the thread whose ID is
pid

to the value specified by
mask.

If
pid

is zero, then the calling thread is used.
The argument
cpusetsize

is the length (in bytes) of the data pointed to by
mask.

Normally this argument would be specified as
sizeof(cpu_set_t).

If the thread specified by
pid

is not currently running on one of the CPUs specified in
mask,

then that thread is migrated to one of the CPUs specified in
mask.

sched_getaffinity()

writes the affinity mask of the thread whose ID is
pid

into the
cpu_set_t

structure pointed to by
mask.

The
cpusetsize

argument specifies the size (in bytes) of
mask.

If
pid

is zero, then the mask of the calling thread is returned.

RETURN VALUE

On success,
sched_setaffinity()

and
sched_getaffinity()

return 0.
On error, -1 is returned, and
errno

is set appropriately.

ERRORS

EFAULT

A supplied memory address was invalid.

EINVAL

The affinity bit mask
mask

contains no processors that are currently physically on the system
and permitted to the thread according to any restrictions that
may be imposed by the "cpuset" mechanism described in
cpuset(7).

EINVAL

(sched_getaffinity()

and, in kernels before 2.6.9,
sched_setaffinity())

cpusetsize

is smaller than the size of the affinity mask used by the kernel.

EPERM

(sched_setaffinity())

The calling thread does not have appropriate privileges.
The caller needs an effective user ID equal to the real user ID
or effective user ID of the thread identified by
pid,

or it must possess the
CAP_SYS_NICE

capability.

ESRCH

The thread whose ID is pid could not be found.

VERSIONS

The CPU affinity system calls were introduced in Linux kernel 2.5.8.
The system call wrappers were introduced in glibc 2.3.
Initially, the glibc interfaces included a
cpusetsize

argument, typed as
unsigned int.

In glibc 2.3.3, the
cpusetsize

argument was removed, but was then restored in glibc 2.3.4, with type
size_t.

CONFORMING TO

These system calls are Linux-specific.

NOTES

After a call to
sched_setaffinity(),

the set of CPUs on which the thread will actually run is
the intersection of the set specified in the
mask

argument and the set of CPUs actually present on the system.
The system may further restrict the set of CPUs on which the thread
runs if the "cpuset" mechanism described in
cpuset(7)

is being used.
These restrictions on the actual set of CPUs on which the thread
will run are silently imposed by the kernel.

sched(7)

has a description of the Linux scheduling scheme.

The affinity mask is a per-thread attribute that can be
adjusted independently for each of the threads in a thread group.
The value returned from a call to
gettid(2)

can be passed in the argument
pid.

Specifying
pid

as 0 will set the attribute for the calling thread,
and passing the value returned from a call to
getpid(2)

will set the attribute for the main thread of the thread group.
(If you are using the POSIX threads API, then use
pthread_setaffinity_np(3)

instead of
sched_setaffinity().)

A child created via
fork(2)

inherits its parent's CPU affinity mask.
The affinity mask is preserved across an
execve(2).

C library/kernel ABI differences

This manual page describes the glibc interface for the CPU affinity calls.
The actual system call interface is slightly different, with the
mask

being typed as
unsigned long *,

reflecting the fact that the underlying implementation of CPU
sets is a simple bit mask.
On success, the raw
sched_getaffinity()

system call returns the size (in bytes) of the
cpumask_t

data type that is used internally by the kernel to
represent the CPU set bit mask.

SEE ALSO

taskset(1),

clone(2),

getcpu(2),

getpriority(2),

gettid(2),

nice(2),

sched_get_priority_max(2),

sched_get_priority_min(2),

sched_getscheduler(2),

sched_setscheduler(2),

setpriority(2),

CPU_SET(3),

pthread_setaffinity_np(3),

sched_getcpu(3),

capabilities(7),

cpuset(7),

sched(7)

Index

NAME

SYNOPSIS

DESCRIPTION

RETURN VALUE

ERRORS

VERSIONS

CONFORMING TO

NOTES

C library/kernel ABI differences

SEE ALSO

This document was created by
man2html,
using the manual pages.

Time: 02:54:47 GMT, September 18, 2014

redpajama_set_name: RedPajamaGithub


text:
    clippy::derive_partial_eq_without_eq,
    clippy::items_after_statements,
    clippy::manual_map, // https://github.com/rust-lang/rust-clippy/issues/7820
    clippy::missing_errors_doc,
    clippy::needless_doctest_main,
    clippy::semicolon_if_nothing_returned, // https://github.com/rust-lang/rust-clippy/issues/7324
    clippy::unused_self,
    clippy::wildcard_imports
)]

mod alloc {
    #[cfg(not(feature = "std"))]
    extern crate alloc;

    #[cfg(feature = "std")]
    use std as alloc;

    pub use self::alloc::borrow::ToOwned;
    pub use self::alloc::boxed::Box;
    pub use self::alloc::string::{String, ToString};
    pub use self::alloc::{vec, vec::Vec};
}

#[macro_use]
mod macros;

mod any;
mod de;
mod error;
mod features_check;
mod map;
mod ser;

pub use crate::de::{deserialize, Deserializer};
pub use crate::error::{Error, Result};
pub use crate::ser::{serialize, Serialize, Serializer};

// Not public API.
#[doc(hidden)]
#[path = "private.rs"]
pub mod __private;


text:
package org.flowable.rest.conf;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = { "org.flowable.rest.conf.common", "org.flowable.rest.conf.engine" })
public class ApplicationConfiguration {

}


text:
/**
 * I'am responsible to handle user event on changing the
 * brush distance
 */
define(function(require){

  var defineComponent = require('flight/lib/component'),
      mustache = require('mustache'),
      tmpl = require('text!./template.html');

  return defineComponent(brushDistanceWidget);

  function brushDistanceWidget(){

    this.defaultAttrs({
      width: 0,
      brushDistanceWidgetEl: '#brushdistance-widget',
      brushDistanceInfoEl: '.brushdistance-info'
    });

    this.after('initialize', function(){
      this.renderWidget({value: this.attr.width});
      this.attachEventListeners();
    });

    this.attachEventListeners = function(){
      this.on('change', {
        brushDistanceWidgetEl: this.brushDistanceChanged
      });
    };

    this.renderWidget = function(data){
      var widget = mustache.render(tmpl, data);

      if (this.$node.children().length) {
        this.$node.children().replaceWith(widget);
      } else {
        this.$node.append(widget);
      }
    };

    this.brushDistanceChanged = function(e, data){
      var distance = parseInt(e.target.value, 10);

      this.select('brushDistanceInfoEl').html(distance);
      this.trigger(document, 'change-brushProperty', {
        distance: distance
      });
    };

  }

});


text:
LocationForegroundElementsPage::LocationForegroundElementsPage(QWidget *parent) :
    Page<Location>(parent)
{
    QVBoxLayout *pMainLayout = new QVBoxLayout();

    pForegroundElementManipulator = new ListManipulator<ForegroundElement>();
    pMainLayout->addWidget(pForegroundElementManipulator);

    setLayout(pMainLayout);
}

void LocationForegroundElementsPage::Init(Location *pObject)
{
    Page<Location>::Init(pObject);
    pForegroundElementManipulator->SetParentObject(pObject);
}

void LocationForegroundElementsPage::Reset()
{
}


text:
using System;
using System.Collections;
using System.IO;
using FluorineFx.Messaging.Api;
using FluorineFx.Messaging.Api.Messaging;
using FluorineFx.Messaging.Api.Stream;
using FluorineFx.Messaging.Rtmp.Stream.Messages;

namespace FluorineFx.Messaging.Rtmp.Stream
{
    enum FrameDropperState
    {
        ///
        /// Send keyframes, interframes and disposable interframes.
        ///
        SEND_ALL = 0,
        ///
        /// Send keyframes and interframes.
        ///
        SEND_INTERFRAMES = 1,
        ///
        /// Send keyframes only.
        ///
        SEND_KEYFRAMES = 2,
        ///
        /// Send keyframes only and switch to SEND_INTERFRAMES later.
        ///
        SEND_KEYFRAMES_CHECK = 3
    }

    ///
    /// Interface for classes that implement logic to drop frames.
    ///
    interface IFrameDropper
    {
        ///
        /// Checks if a message may be sent to the subscriber.
        ///
        /// <param name="message">The message to check.</param>
        /// <param name="pending">The number of pending messages.</param>
        /// <returns>true if the packet may be sent, otherwise false.</returns>
	    bool CanSendPacket(RtmpMessage message, long pending);
        ///
        /// Notify that a packet has been dropped.
        ///
        /// <param name="message">The message that was dropped.</param>
        void DropPacket(RtmpMessage message);
        ///
        /// Notify that a message has been sent.
        ///
        /// <param name="message">The message that was sent.</param>
        void SendPacket(RtmpMessage message);
	    ///
        /// Reset the frame dropper.
	    ///
	    void Reset();
        ///
        /// Reset the frame dropper to a given state.
        ///
        /// <param name="state">The state to reset the frame dropper to.</param>
        void Reset(FrameDropperState state);
    }
}


text:
package org.intellij.lang.xpath.xslt.quickfix;

import com.intellij.codeInsight.template.TemplateBuilderImpl;
import com.intellij.codeInsight.template.TemplateManager;
import com.intellij.codeInsight.template.impl.MacroCallNode;
import com.intellij.codeInsight.template.macro.CompleteMacro;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
import com.intellij.psi.*;
import com.intellij.psi.xml.XmlAttribute;
import com.intellij.psi.xml.XmlTag;
import com.intellij.util.IncorrectOperationException;
import org.intellij.lang.xpath.xslt.XsltSupport;
import org.intellij.lang.xpath.xslt.psi.XsltParameter;
import org.intellij.lang.xpath.xslt.refactoring.RefactoringUtil;
import org.jetbrains.annotations.NotNull;

public class AddWithParamFix extends AbstractFix {
    protected XmlTag myTag;
    private final String myName;

    protected AddWithParamFix() {
        myName = null;
    }

    public AddWithParamFix(XsltParameter parameter, XmlTag tag) {
        myTag = tag;
        myName = parameter.getName();
    }

    @NotNull
    public String getText() {
        return "Add Argument for '" + myName + "'";
    }

    public boolean isAvailableImpl(@NotNull Project project, Editor editor, PsiFile file) {
        return myTag.isValid();
    }

    public boolean startInWriteAction() {
        return false;
    }

    protected boolean requiresEditor() {
        return true;
    }

    public void invoke(@NotNull final Project project, final Editor editor, PsiFile file) throws IncorrectOperationException {
        SmartPsiElementPointer<XmlTag> result = WriteAction.compute(() -> {
            final XmlTag withParamTag = RefactoringUtil.addWithParam(myTag);

            withParamTag.setAttribute("name", myName != null ? myName : "dummy");
            withParamTag.setAttribute("select", "dummy");
            return SmartPointerManager.getInstance(project).
              createSmartPsiElementPointer(withParamTag);
        });

        final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
        final Document doc = psiDocumentManager.getDocument(file);
        assert doc != null;
        psiDocumentManager.doPostponedOperationsAndUnblockDocument(doc);

        final XmlTag withParamTag = result.getElement();
        assert withParamTag != null;

        final TemplateBuilderImpl builder = new TemplateBuilderImpl(withParamTag);
        final XmlAttribute selectAttr = withParamTag.getAttribute("select", null);
        assert selectAttr != null;
        PsiElement dummy = XsltSupport.getAttValueToken(selectAttr);
        builder.replaceElement(dummy, new MacroCallNode(new CompleteMacro()));

        if (myName == null) {
            final XmlAttribute nameAttr = withParamTag.getAttribute("name", null);
            assert nameAttr != null;
            dummy = XsltSupport.getAttValueToken(nameAttr);
            builder.replaceElement(dummy, new MacroCallNode(new CompleteMacro()));
        }

        moveTo(editor, withParamTag);

        WriteAction.run(() -> {
            PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument());
            final TemplateManager mgr = TemplateManager.getInstance(myTag.getProject());
            mgr.startTemplate(editor, builder.buildInlineTemplate());
        });
    }
}


text:
export class Language {
    id: string;
    name: string;
    version: string;
    order: number;
    description: string;
    tags: string[];
    link: string;
    links: string[];
    hljs: string;
    mime: string;
    current: boolean;
    show: boolean;
}

export class Project {
    id: string;
    name: string;
    show: boolean;
    order: number;
    type: ProjectType;
    description: string;
    text: string;
    languages: string[];
    output: string;
    alternativeOutputs: Output;
    notes: object;
    extraCode: object;
    moduleFiles: string[];
}

export class Output {
    text: string;
    output: string;
}

export enum ProjectType {
    steps,
    code
}

export class Program {
    name: string;
    link: string;
    description: string;
}

export class ProjpectImplementation {
    projectId: string;
    languages: (LanguageImplementation | string)[];
}

export class LanguageImplementation {
    notes: string[];
    isCross: boolean = true;
}

export class PlatformImplementation {
    notAvailable: boolean;
    notes: string;
}

export class StepsImplementation {
    languageId: string;
    steps: Step[];
}

export enum Platform {
    NA = 0,
    linux_deb = 1 << 0,
    linux_rpm = 1 << 1,
    linux = linux_deb | linux_rpm,
    macOS = 1 << 2,
    windows = 1 << 3,
    cross  = linux | macOS | windows
}

export class Step {
    type: StepType;
    program: string;
    command: string;
    name: string;
    link: string;
    notes: string[];
}

export enum StepType {
    install,
    open,
    command,
    image,
    none
}


text:
All notable changes to this project will be documented in this file, in reverse chronological order by release.

## 0.4.0

### Added

- Nothing.

### Deprecated

- [#16](https://github.com/bitExpert/adrenaline/pull/16) Upgrade to Adroit 0.7.0

### Removed

- Nothing.

### Fixed

- Nothing.

## 0.3.0

### Added

- [#14](https://github.com/bitExpert/adrenaline/pull/14) Add fig/http-message-util to fix #12
- [#12](https://github.com/bitExpert/adrenaline/issues/12) Include the PSR-7 Request and Method Utilities
- [#13](https://github.com/bitExpert/adrenaline/issues/13) fix/stratigility update

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

- [#11](https://github.com/bitExpert/adrenaline/issues/11) fix/stratigility update
- [#9](https://github.com/bitExpert/adrenaline/issues/9) Stratigility upgrade shows warning

## 0.2.0

### Added

- [#7](https://github.com/bitExpert/adrenaline/pull/7) Dropping PHP 5.x support

### Deprecated

- Nothing.

### Removed

- Nothing.

### Fixed

-  [#4](https://github.com/bitExpert/adrenaline/pull/4) Change 'precede' to 'proceed'
-  [#2](https://github.com/bitExpert/adrenaline/issues/2) JsonResponder and TwigResponder don't respect status set in payload

## 0.1.0

Initial release of Adrenaline


text:
using System.Collections.Generic;
using JetBrains.Annotations;

namespace MicroFlow.Graph
{
  public static class Background
  {
    [NotNull]
    public static string OfCategory([NotNull] string category)
    {
      string color;
      if (!Colors.TryGetValue(category, out color))
      {
        color = "#EEEEEE";
      }
      return color;
    }

    private static readonly Dictionary<string, string> Colors = new Dictionary<string, string>
    {
      [Categories.ActivityNode] = "DarkBlue",
      [Categories.ConditionNode] = "Goldenrod",
      [Categories.SwitchNode] = "Purple",
      [Categories.ForkJoinNode] = "#FF672878",
      [Categories.ForkNode] = "Green",
      [Categories.BlockNode] = "#EEEEEE",
      [Categories.FaultHandlerNode] = "Brown"
    };
  }
}


text:
using System.Linq;

using Eventualize.Interfaces.BaseTypes;

namespace Eventualize.Domain.MetaModel
{
    /// <summary>
    /// Base class for all meta models that are connected to a bounded context.
    /// </summary>
    public class BoundedContextRelatedMetaModel
    {
        public BoundedContextRelatedMetaModel(BoundedContextName boundedContextName)
        {
            this.BoundedContextName = boundedContextName;
        }

        /// <summary>
        /// The name of the bounded context to which this instance belongs.
        /// </summary>
        public BoundedContextName BoundedContextName { get; }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Interview.ParallelCounter
{
    public class Counter : ICounter
    {
        public int Value { get; private set; }

        public void Increment()
        {
            Value += 1;
        }
    }
}


text:
import {Component, Inject} from '@angular/core';

import {KnalledgeMapViewService} from '../../app/components/knalledgeMap/knalledgeMapViewService';
import {KnalledgeMapPolicyService} from '../../app/components/knalledgeMap/knalledgeMapPolicyService';
import {GlobalEmitterServicesArray} from '../../app/components/collaboPlugins/GlobalEmitterServicesArray';
import {CfPuzzlesIbisService} from './cf.puzzles.ibis.service';
@Component({
    selector: 'ibis-actions-form',
    providers: [
        //MATERIAL_PROVIDERS
    ],
    moduleId: module.id,
    templateUrl: 'partials/ibis-actions-form.tpl.html',
    styles: [`
    `]
})
export class IbisActionsForm {
  public kNodesTypes:Array<any> = [];
  public selectedItem:any = null;
  private componentShown:boolean = true;
  private ibisTypesService;
  private viewConfig:any;
  private policyConfig:any;
  private knalledgeNodeTypeChanged: string = "knalledgeNodeTypeChanged";

  constructor(
    @Inject('IbisTypesService') _IbisTypesService_,
    @Inject('KnalledgeMapViewService') knalledgeMapViewService:KnalledgeMapViewService,
    @Inject('KnalledgeMapPolicyService') knalledgeMapPolicyService:KnalledgeMapPolicyService,
    @Inject('GlobalEmitterServicesArray') private globalEmitterServicesArray:GlobalEmitterServicesArray,
    private ibisService:CfPuzzlesIbisService
  ) {
      // console.log('[IbisActionsForm]');
      this.ibisTypesService = _IbisTypesService_;

      this.kNodesTypes = this.ibisTypesService.getTypes();
      this.selectedItem = this.ibisTypesService.getActiveType();
      this.viewConfig = knalledgeMapViewService.get().config;
      this.policyConfig = knalledgeMapPolicyService.get().config;
      this.globalEmitterServicesArray.register(this.knalledgeNodeTypeChanged);
      // this.globalEmitterServicesArray.get(this.knalledgeNodeTypeChanged).subscribe('IbisActionsForm', function(vkNode,type) {
      //     console.log("knalledgeNodeTypeChanged: ", vkNode.kNode.name, type);
      // });
  }

  selectItem (item) {
    this.selectedItem = item;
    this.ibisTypesService.selectActiveType(item);

    if(this.policyConfig.knalledgeMap){
      this.policyConfig.knalledgeMap.nextNodeType = null;
    }

    if(this.viewConfig.states.editingNode){
      this.globalEmitterServicesArray.get(this.knalledgeNodeTypeChanged)
      .broadcast('IbisActionsForm',{node:this.viewConfig.states.editingNode,type:item.type});
      //, this.selectedItem
    }
  }

  hideShowComponent (){
    this.componentShown = !this.componentShown;
  }

  onQuestionItem() {
    this.ibisService.createNodeQuestion();
  }

  onIdeaItem() {
    this.ibisService.createNodeIdea();
  }

  onArgumentItem() {
    this.ibisService.createNodeArgument();
  }

  onCommentItem() {
    this.ibisService.createNodeComment();
  }

  onVoteUpItem() {
    this.ibisService.voteNodeUp();
  }

  onVoteDownItem() {
    this.ibisService.voteNodeDown();
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Urceolaria scabra Pers.

### Remarks
null


text:
"""
Django migrations for django-registration-redux

This package does not contain South migrations.

These are Django native migrations. They require Django > 1.7.

"""


text:
void rref(const size_t nrows,
          const size_t ncols,
          double **mat,
          size_t &nrank,
          const double tolerance)
{
    // Return the reduced row echelon form (rref) of matrix mat.
    // In addition, rank of the matrix is estimated.

    size_t jcol;
    double tmp;

    nrank = 0;

    size_t icol = 0;

    for (size_t irow = 0; irow < nrows; ++irow) {

        auto pivot = irow;

        while (std::abs(mat[pivot][icol]) < tolerance) {
            ++pivot;

            if (pivot == nrows) {
                pivot = irow;
                ++icol;

                if (icol == ncols) break;
            }
        }

        if (icol == ncols) break;

        if (std::abs(mat[pivot][icol]) > tolerance) ++nrank;

        if (pivot != irow) {
            //#pragma omp parallel for private(tmp)
            for (jcol = icol; jcol < ncols; ++jcol) {
                tmp = mat[pivot][jcol];
                mat[pivot][jcol] = mat[irow][jcol];
                mat[irow][jcol] = tmp;
            }
        }

        tmp = mat[irow][icol];
        tmp = 1.0 / tmp;
        //#pragma omp parallel for
        for (jcol = icol; jcol < ncols; ++jcol) {
            mat[irow][jcol] *= tmp;
        }

        for (auto jrow = 0; jrow < nrows; ++jrow) {
            if (jrow == irow) continue;

            tmp = mat[jrow][icol];
            //#pragma omp parallel for
            for (jcol = icol; jcol < ncols; ++jcol) {
                mat[jrow][jcol] -= tmp * mat[irow][jcol];
            }
        }
    }
}

void rref(std::vector<std::vector<double>> &mat,
          const double tolerance)
{
    // Return the reduced row echelon form (rref) of matrix mat.
    // In addition, rank of the matrix is estimated.

    size_t jcol;
    double tmp;

    size_t nrank = 0;
    size_t icol = 0;

    const auto nrows = mat.size();
    const auto ncols = mat[0].size();

    for (size_t irow = 0; irow < nrows; ++irow) {

        auto pivot = irow;

        while (std::abs(mat[pivot][icol]) < tolerance) {
            ++pivot;

            if (pivot == nrows) {
                pivot = irow;
                ++icol;

                if (icol == ncols) break;
            }
        }

        if (icol == ncols) break;

        if (std::abs(mat[pivot][icol]) > tolerance) ++nrank;

        if (pivot != irow) {
            for (jcol = icol; jcol < ncols; ++jcol) {
                tmp = mat[pivot][jcol];
                mat[pivot][jcol] = mat[irow][jcol];
                mat[irow][jcol] = tmp;
            }
        }

        tmp = mat[irow][icol];
        tmp = 1.0 / tmp;
        for (jcol = icol; jcol < ncols; ++jcol) {
            mat[irow][jcol] *= tmp;
        }

        for (size_t jrow = 0; jrow < nrows; ++jrow) {
            if (jrow == irow) continue;

            tmp = mat[jrow][icol];
            for (jcol = icol; jcol < ncols; ++jcol) {
                mat[jrow][jcol] -= tmp * mat[irow][jcol];
            }
        }
    }

    mat.erase(mat.begin() + nrank, mat.end());
    mat.shrink_to_fit();
}

void rref_sparse(const size_t ncols,
                 ConstraintSparseForm &sp_constraint,
                 const double tolerance)
{
    // This function is somewhat sensitive to the numerical accuracy.
    // The loss of numerical digits can lead to instability.
    // Column ordering may improve the stability, but I'm not sure.
    // Smaller tolerance is preferable.

    const auto nrows = sp_constraint.size();
    size_t jrow;
    double scaling_factor;
    double division_factor;

    // This parameter controls the stability and performance.
    // Smaller value is more stable but little more costly.
    //    double zero_criterion = tolerance * 1.0e-3;
    const auto zero_criterion = eps15;

    size_t nrank = 0;
    size_t icol = 0;
    MapConstraintElement::iterator it_other;
    MapConstraintElement::iterator it_elem;

    for (size_t irow = 0; irow < nrows; ++irow) {

        auto pivot = irow;

        while (true) {
            it_elem = sp_constraint[pivot].find(icol);
            if (it_elem != sp_constraint[pivot].end()) {
                if (std::abs(it_elem->second) >= tolerance) {
                    break;
                }
            }

            ++pivot;
            if (pivot == nrows) {
                pivot = irow;
                ++icol;

                if (icol == ncols) break;
            }
        }

        if (icol == ncols) break;

        if (std::abs(it_elem->second) >= tolerance) ++nrank;

        if (pivot != irow) {
            std::iter_swap(sp_constraint.begin() + irow,
                           sp_constraint.begin() + pivot);
        }

        division_factor = 1.0 / it_elem->second;
        for (auto &it: sp_constraint[irow]) {
            it.second *= division_factor;
        }

        for (jrow = 0; jrow < nrows; ++jrow) {
            if (jrow == irow) continue;

            it_elem = sp_constraint[jrow].find(icol);
            if (it_elem == sp_constraint[jrow].end()) continue;
            scaling_factor = it_elem->second;

            // Subtract irow elements from jrow
            for (const auto &it_now: sp_constraint[irow]) {
                // This part might be accelerated by using std::map::lower_bound
                // when the datatype of sp_constraint[irow] is std::map.
                if (it_now.first < icol) {
                    continue;
                }
                it_other = sp_constraint[jrow].find(it_now.first);
                if (it_other != sp_constraint[jrow].end()) {
                    it_other->second -= scaling_factor * it_now.second;
                    // Delete zero elements and remove from map.
                    // A smaller threshould is used for better stability.
                    if (std::abs(it_other->second) < zero_criterion) {
                        sp_constraint[jrow].erase(it_other);
                    }
                } else {
                    sp_constraint[jrow][it_now.first] = -scaling_factor * it_now.second;
                }
            }
            // Make sure to erase the icol element from the target row if it exists.
            // When the original pivot element is large, the element after subtraction can sometimes be
            // larger than the tolerance value because of the loss of significant digis.
            it_other = sp_constraint[jrow].find(icol);
            if (it_other != sp_constraint[jrow].end()) {
                sp_constraint[jrow].erase(it_other);
            }
        }
    }

    // Erase all elements smaller than the tolerance value
    for (jrow = 0; jrow < nrows; ++jrow) {
        auto it_other = sp_constraint[jrow].begin();
        while (it_other != sp_constraint[jrow].end()) {
            if (std::abs(it_other->second) <= tolerance) {
                sp_constraint[jrow].erase(it_other++);
            } else {
                ++it_other;
            }
        }
    }

    // Remove emptry entries from the sp_constraint vector
    sp_constraint.erase(std::remove_if(sp_constraint.begin(),
                                       sp_constraint.end(),
                                       [](const MapConstraintElement &obj) { return obj.empty(); }),
                        sp_constraint.end());
    sp_constraint.shrink_to_fit();
}


text:
<?php

namespace Google\Cloud\OsLogin\Tests\System\V1beta;

use Google\Auth\CredentialsLoader;
use Google\Cloud\OsLogin\V1beta\OsLoginServiceClient;
use Google\Cloud\OsLogin\V1beta\LoginProfile;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

class OsLoginServiceClientTest extends TestCase
{
    protected static $grpcClient;
    protected static $restClient;
    protected static $clientEmail;
    private static $hasSetUp = false;

    public function clientProvider()
    {
        self::set_up_before_class();

        return [
            [self::$restClient],
            [self::$grpcClient]
        ];
    }

    public static function set_up_before_class()
    {
        if (self::$hasSetUp) {
            return;
        }

        $keyFilePath = getenv('GOOGLE_CLOUD_PHP_TESTS_KEY_PATH');
        $keyFileData = json_decode(file_get_contents($keyFilePath), true);

        self::$restClient = new OsLoginServiceClient([
            'credentials' => $keyFilePath,
            'transport' => 'rest'
        ]);

        self::$grpcClient = new OsLoginServiceClient([
            'credentials' => $keyFilePath,
            'transport' => 'grpc'
        ]);

        self::$clientEmail = $keyFileData['client_email'];

        self::$hasSetUp = true;
    }

    /**
     * @dataProvider clientProvider
     */
    public function testListOperations(OsLoginServiceClient $client)
    {
        $response = $client->getLoginProfile(
            $client->userName(self::$clientEmail)
        );

        $this->assertInstanceOf(LoginProfile::class, $response);
    }
}


text:
define('views/lb-everywhere/lbe-body',['require','jquery','utils/browser','utils/metrics','utils/pubsub','views/lb/lb-base','utils/lb/lb-common','views/lb/trad','views/lb/ou','utils/scores'],function(require) {
	var $ = require('jquery'),
		Browser = require('utils/browser'),
		Metrics = require('utils/metrics'),
		PubSub = require('utils/pubsub'),
		LBBase = require('views/lb/lb-base'),
		LBCommon = require('utils/lb/lb-common'),
		TradView = require('views/lb/trad'),
		OUView = require('views/lb/ou'),
		Scores = require('utils/scores')
		;

	var LBBodyView = LBBase.extend({
		el: '.lb-body',

		events: {
		},

		initialize: function(opts) {
			this.logger = new eventsCore.util.Logger('LBBodyView');
			this.logger.info('Initialize');

			this.currentLB = opts.lbtype; // "trad" or "ou"

      		// listener - events fired by lbsubmenu when view selector is clicked
			this.listenTo(PubSub, 'lbEverywhere:showLBView', this.resetCurrentLB);

		},

		onRender: function() {
			this.drawLeaderboard();
			return this;
		},

		onDispose: function() {
			this.tradplayerlist.dispose();
			this.ouplayerlist.dispose();
		},

		drawLeaderboard: function() {
			if(!Scores.isDataLoaded()) {
				PubSub.off('scores:refresh', this.drawLeaderboard, this)
          				.once('scores:refresh', this.drawLeaderboard, this);
				return;
			} else {
				this.buildOULB();
				this.buildTradLB();
				this.showSelectedView(this.currentLB);
			}
		},

		buildTradLB: function() {
			this.tradplayerlist = new TradView({
				el: this.$('#traditional'),
				lbFormat: LBCommon.lbFormat.EVERYWHERE
			}).render();
		},

		buildOULB: function() {
			this.ouplayerlist = new OUView({
        	el: this.$('#overunder'),
        	lbFormat: LBCommon.lbFormat.EVERYWHERE
      		}).render();
		},

    	// view selector changed - listener currenLB:update
    	// reset this.currentLB to be updated value
		resetCurrentLB: function(newLB) {
			this.currentLB = newLB;
			this.showSelectedView(this.currentLB);

      		// when LB view is switched b/w OU and Trad,
      		// redraw the bottom border
			var container = newLB + 'AllPlayersContainer';
			this.addBottomBorders(container);
			PubSub.trigger('lookup.unveil');
		},

    	//override lb-base
		showSelectedView: function(currentLB) {
     		 // get scroll position before hiding previously selected view
			var wrapper = this.$('.content.selected');
			if(wrapper.length > 0) {
        		var scrollVal = wrapper.find('.scroll-pane').scrollTop();
				wrapper.removeClass('selected');
			}

      		// display currently selected view and set scroll position
			wrapper = this.$('.content.' + this.currentLB);
			wrapper.addClass('selected');
      		wrapper.find('.scroll-pane').scrollTop(scrollVal);

		}

	});
	return LBBodyView;
});


text:
#include "ui/UIEditBox/UIEditBoxImpl-tizen.h"

#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)

#include <Evas.h>
#include <Elementary.h>
#include <efl_extension.h>

#include "ui/UIEditBox/UIEditBox.h"
#include "2d/CCLabel.h"
#include "base/ccUTF8.h"

#include "platform/tizen/CCApplication-tizen.h"
#include "base/CCDirector.h"

NS_CC_BEGIN

namespace ui {

EditBoxImpl* __createSystemEditBox(EditBox* pEditBox)
{
    return new EditBoxImplTizen(pEditBox);
}

EditBoxImplTizen::EditBoxImplTizen(EditBox* pEditText)
: EditBoxImpl(pEditText)
, _label(nullptr)
, _labelPlaceHolder(nullptr)
, _editBoxInputMode(EditBox::InputMode::SINGLE_LINE)
, _editBoxInputFlag(EditBox::InputFlag::INITIAL_CAPS_ALL_CHARACTERS)
, _keyboardReturnType(EditBox::KeyboardReturnType::DEFAULT)
, _colText(Color3B::WHITE)
, _colPlaceHolder(Color3B::GRAY)
, _maxLength(-1)
{

}

EditBoxImplTizen::~EditBoxImplTizen()
{

}

void EditBoxImplTizen::doAnimationWhenKeyboardMove(float duration, float distance)
{ // don't need to be implemented on tizen platform.

}

static const int CC_EDIT_BOX_PADDING = 5;

bool EditBoxImplTizen::initWithSize(const Size& size)
{
    int fontSize = size.height-12;
    _label = Label::create();
    _label->setSystemFontSize(size.height-12);
    // align the text vertically center
    _label->setAnchorPoint(Vec2(0, 0.5f));
    _label->setPosition(Vec2(CC_EDIT_BOX_PADDING, size.height / 2.0f));
    _label->setTextColor(_colText);
    _editBox->addChild(_label);

    _labelPlaceHolder = Label::create();
    _labelPlaceHolder->setSystemFontSize(size.height-12);
    // align the text vertically center
    _labelPlaceHolder->setAnchorPoint(Vec2(0, 0.5f));
    _labelPlaceHolder->setPosition(CC_EDIT_BOX_PADDING, size.height / 2.0f);
    _labelPlaceHolder->setVisible(false);
    _labelPlaceHolder->setTextColor(_colPlaceHolder);
    _editBox->addChild(_labelPlaceHolder);

    _editSize = size;
    return true;
}

void EditBoxImplTizen::setFont(const char* pFontName, int fontSize)
{
    if(_label != NULL) {
        _label->setSystemFontName(pFontName);
        _label->setSystemFontSize(fontSize);
    }

    if(_labelPlaceHolder != NULL) {
        _labelPlaceHolder->setSystemFontName(pFontName);
        _labelPlaceHolder->setSystemFontSize(fontSize);
    }
}

void EditBoxImplTizen::setFontColor(const Color4B& color)
{
    _colText = color;
    _label->setTextColor(color);
}

void EditBoxImplTizen::setPlaceholderFont(const char* pFontName, int fontSize)
{
    if(_labelPlaceHolder != NULL) {
        _labelPlaceHolder->setSystemFontName(pFontName);
        _labelPlaceHolder->setSystemFontSize(fontSize);
    }
}

void EditBoxImplTizen::setPlaceholderFontColor(const Color4B& color)
{
    _colPlaceHolder = color;
    _labelPlaceHolder->setTextColor(color);
}

void EditBoxImplTizen::setInputMode(EditBox::InputMode inputMode)
{
    _editBoxInputMode = inputMode;
}

void EditBoxImplTizen::setMaxLength(int maxLength)
{
    _maxLength = maxLength;
}

int EditBoxImplTizen::getMaxLength()
{
    return _maxLength;
}

void EditBoxImplTizen::setInputFlag(EditBox::InputFlag inputFlag)
{
    _editBoxInputFlag = inputFlag;
}

void EditBoxImplTizen::setReturnType(EditBox::KeyboardReturnType returnType)
{
    _keyboardReturnType = returnType;
}

bool EditBoxImplTizen::isEditing()
{
    return false;
}

void EditBoxImplTizen::setText(const char* pText)
{
    if (pText != NULL)
    {
        _text = pText;

        if (_text.length() > 0)
        {
            _labelPlaceHolder->setVisible(false);

            std::string strToShow;

            if (EditBox::InputFlag::PASSWORD == _editBoxInputFlag)
            {
                long length = cc_utf8_strlen(_text.c_str(), -1);
                for (long i = 0; i < length; i++)
                {
                    strToShow.append("*");
                }
            }
            else
            {
                strToShow = _text;
            }

            _label->setString(strToShow.c_str());

            // Clip the text width to fit to the text box

            float fMaxWidth = _editSize.width - CC_EDIT_BOX_PADDING * 2;
            auto labelSize = _label->getContentSize();
            if(labelSize.width > fMaxWidth) {
                _label->setDimensions(fMaxWidth,labelSize.height);
            }
        }
        else
        {
            _labelPlaceHolder->setVisible(true);
            _label->setString("");
        }

    }
}

const char*  EditBoxImplTizen::getText(void)
{
    return _text.c_str();
}

void EditBoxImplTizen::setPlaceHolder(const char* pText)
{
    if (pText != NULL)
    {
        _placeHolder = pText;
        if (_placeHolder.length() > 0 && _text.length() == 0)
        {
            _labelPlaceHolder->setVisible(true);
        }

        _labelPlaceHolder->setString(_placeHolder.c_str());
    }
}

void EditBoxImplTizen::setPosition(const Vec2& pos)
{ // don't need to be implemented on tizen platform.

}

void EditBoxImplTizen::setVisible(bool visible)
{ // don't need to be implemented on tizen platform.

}

void EditBoxImplTizen::setContentSize(const Size& size)
{ // don't need to be implemented on tizen platform.

}

void EditBoxImplTizen::setAnchorPoint(const Vec2& anchorPoint)
{ // don't need to be implemented on tizen platform.

}

void EditBoxImplTizen::visit(void)
{ // don't need to be implemented on tizen platform.

}

void EditBoxImplTizen::onEnter(void)
{ // don't need to be implemented on tizen platform.

}

static void editBoxCallbackFunc(const char* pText, void* ctx)
{
    EditBoxImplTizen* thiz = (EditBoxImplTizen*)ctx;
    thiz->setText(pText);

    if (thiz->getDelegate() != NULL)
    {
        thiz->getDelegate()->editBoxTextChanged(thiz->getEditBox(), thiz->getText());
        thiz->getDelegate()->editBoxEditingDidEnd(thiz->getEditBox());
        thiz->getDelegate()->editBoxReturn(thiz->getEditBox());
    }

#if CC_ENABLE_SCRIPT_BINDING
    EditBox* pEditBox = thiz->getEditBox();
    if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
    {
        CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox);
        ScriptEvent event(kCommonEvent,(void*)&data);
        ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
        memset(data.eventName, 0, sizeof(data.eventName));
        strncpy(data.eventName, "ended", sizeof(data.eventName));
        event.data = (void*)&data;
        ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
        memset(data.eventName, 0, sizeof(data.eventName));
        strncpy(data.eventName, "return", sizeof(data.eventName));
        event.data = (void*)&data;
        ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
    }
#endif
}

static Evas_Object * s_keypadWin = nullptr;

static void entry_back_cb(void *data, Evas_Object *obj, void *event_info)
{
    evas_object_del(s_keypadWin);
    s_keypadWin = nullptr;
}

static void entry_activated_cb(void *data, Evas_Object *obj, void *event_info)
{
    char *commit_str = (char *)event_info;
    const char* text = elm_entry_entry_get(obj);
    editBoxCallbackFunc(text, data);
    elm_entry_input_panel_hide(obj);
    evas_object_del(s_keypadWin);
    s_keypadWin = nullptr;
}

void EditBoxImplTizen::openKeyboard()
{
    if (s_keypadWin)
    {
        return;
    }

    if (_delegate != NULL)
    {
        _delegate->editBoxEditingDidBegin(_editBox);
    }

#if CC_ENABLE_SCRIPT_BINDING
    EditBox* pEditBox = this->getEditBox();
    if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
    {
        CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox);
        ScriptEvent event(cocos2d::kCommonEvent,(void*)&data);
        ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
    }
#endif

    Evas_Object* parent = Application::getInstance()->_win;
    GLView* glView = Director::getInstance()->getOpenGLView();
    Size frameSize = glView->getFrameSize();

    s_keypadWin = elm_win_add(parent, "cocos2d-x", ELM_WIN_BASIC);
    elm_win_autodel_set(s_keypadWin, EINA_TRUE);
    elm_win_conformant_set(s_keypadWin, EINA_TRUE);
    elm_win_alpha_set(s_keypadWin, EINA_TRUE);
    evas_object_show(s_keypadWin);
    eext_object_event_callback_add(s_keypadWin, EEXT_CALLBACK_BACK, entry_back_cb, this);
    int rots[2];
    rots[0] = (int)(elm_win_rotation_get(parent));
    rots[1] = rots[0] + 180 % 360;
    elm_win_wm_rotation_available_rotations_set(s_keypadWin, rots, 2);

    Evas_Object* bgFull = elm_bg_add(s_keypadWin);
    evas_object_color_set(bgFull, 0, 0, 0, 0xa0);
    evas_object_resize(bgFull, frameSize.width, frameSize.height);
    evas_object_show(bgFull);

    int height = frameSize.height / 10;
    Evas_Object* rectangle = elm_bg_add(bgFull);
    evas_object_resize(rectangle, frameSize.width, height);
    evas_object_move(rectangle, 0, height);
    evas_object_color_set(rectangle, 0xff, 0xff, 0xff, 0xff);
    evas_object_show(rectangle);

    Evas_Object* title = elm_entry_add(rectangle);
    evas_object_resize(title, frameSize.width, height);
    auto text = _placeHolder.c_str();
    auto richText = (char*)malloc(strlen(text) + 50);
    sprintf(richText,"<color=#ffffff>%s</>", text);
    elm_entry_entry_set(title, richText);
    elm_entry_editable_set(title, EINA_FALSE);
    //elm_entry_drag_disabled_set(title, EINA_TRUE);
    //elm_entry_drop_disabled_set(title, EINA_TRUE);
    evas_object_show(title);
    free(richText);

    Evas_Object* entry = elm_entry_add(bgFull);
    elm_object_focus_set(entry, EINA_TRUE);
    evas_object_resize(entry, frameSize.width, height);
    evas_object_move(entry, 0, height);
    elm_entry_single_line_set(entry, EINA_TRUE);
    elm_entry_line_wrap_set(entry, ELM_WRAP_MIXED);
    elm_entry_entry_set(entry, _text.c_str());
    evas_object_show(entry);
    elm_object_focus_set(entry, EINA_TRUE);
    eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
    Elm_Entry_Filter_Limit_Size limit_size = { 0, };
    limit_size.max_char_count = _maxLength;
    elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_size);
    elm_entry_input_panel_return_key_type_set(entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
    elm_entry_prediction_allow_set(entry, EINA_FALSE);

    evas_object_smart_callback_add(entry, "activated", entry_activated_cb, this);

    switch(_editBoxInputFlag)
    {
    case EditBox::InputFlag::PASSWORD:
        elm_entry_password_set(entry, EINA_TRUE);
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_EMAIL);
        break;
    case EditBox::InputFlag::SENSITIVE:
        elm_entry_input_hint_set(entry, ELM_INPUT_HINT_SENSITIVE_DATA);
        break;
    case EditBox::InputFlag::INITIAL_CAPS_WORD:
        elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_WORD);
        break;
    case EditBox::InputFlag::INITIAL_CAPS_SENTENCE:
        elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_SENTENCE);
        break;
    case EditBox::InputFlag::INITIAL_CAPS_ALL_CHARACTERS:
        elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_ALLCHARACTER);
        break;
    }

    switch(_editBoxInputMode)
    {
    case EditBox::InputMode::ANY:
        break;
    case EditBox::InputMode::EMAIL_ADDRESS:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_EMAIL);
        break;
    case EditBox::InputMode::NUMERIC:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NUMBER);
        break;
    case EditBox::InputMode::PHONE_NUMBER:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_PHONENUMBER);
        break;
    case EditBox::InputMode::URL:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_URL);
        break;
    case EditBox::InputMode::DECIMAL:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_HEX); //fixme?
        break;
    case EditBox::InputMode::SINGLE_LINE:
        break;
    }
}

void EditBoxImplTizen::closeKeyboard()
{

}

}

NS_CC_END

#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) */


text:
package lk.megafundtpark.entities;

import javax.annotation.Generated;
import javax.persistence.metamodel.CollectionAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
import lk.megafundtpark.entities.Tickets;

@Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2017-03-03T05:06:33")
@StaticMetamodel(Customers.class)
public class Customers_ {

    public static volatile SingularAttribute<Customers, Integer> customerid;
    public static volatile SingularAttribute<Customers, String> name;
    public static volatile CollectionAttribute<Customers, Tickets> ticketsCollection;
    public static volatile SingularAttribute<Customers, String> email;

}


text:
require "gapic/common"
require "gapic/config"
require "gapic/config/method"

require "google/cloud/debugger/v2/version"

require "google/cloud/debugger/v2/debugger/credentials"
require "google/cloud/debugger/v2/debugger/client"

module Google
  module Cloud
    module Debugger
      module V2
        ##
        # The Debugger service provides the API that allows users to collect run-time
        # information from a running application, without stopping or slowing it down
        # and without modifying its state.  An application may include one or
        # more replicated processes performing the same work.
        #
        # A debugged application is represented using the Debuggee concept. The
        # Debugger service provides a way to query for available debuggees, but does
        # not provide a way to create one.  A debuggee is created using the Controller
        # service, usually by running a debugger agent with the application.
        #
        # The Debugger service enables the client to set one or more Breakpoints on a
        # Debuggee and collect the results of the set Breakpoints.
        #
        # To load this service and instantiate a client:
        #
        #     require "google/cloud/debugger/v2/debugger"
        #     client = ::Google::Cloud::Debugger::V2::Debugger::Client.new
        #
        module Debugger
        end
      end
    end
  end
end

helper_path = ::File.join __dir__, "debugger", "helpers.rb"
require "google/cloud/debugger/v2/debugger/helpers" if ::File.file? helper_path


text:
class ApplicationController < ActionController::Base
  before_filter :load_account
  before_filter :favorited_mods
  before_filter :updated_mods
  before_filter :newest_mods

  private

  def load_account
    Account
  end

  def favorited_mods
    @favorited_mods = ModDecorator.decorate(Mod.top(10))
  end

  def updated_mods
    @updated_mods = Mod.order(:updated_at).limit(10).decorate
  end

  def newest_mods
    @newest_mods = Mod.order(:created_at).limit(10).decorate
  end

  def updated_crafts
    @updated_crafts = Craft.order(:updated_at).limit(10).decorate
  end

  def newest_crafts
    @newest_crafts = Craft.order(:created_at).limit(10).decorate
  end

  def report_errors(resource)
    Rails.logger.warn("Something went wrong:")
    resource.errors.full_messages.each(&method(:error_line))
  end

  def error_line(error)
    Rails.logger.warn("\n  * #{error}")
  end
end