text:
package com.fasterxml.jackson.databind.ser.filter;

import java.io.IOException;
import java.util.*;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
 * Unit tests for checking that alternative settings for
 * {@link JsonSerialize#include} annotation property work
 * as expected.
 */
public class JsonIncludeTest
    extends BaseMapTest
{
    static class SimpleBean
    {
        public String getA() { return "a"; }
        public String getB() { return null; }
    }

    @JsonInclude(JsonInclude.Include.ALWAYS) // just to ensure default
    static class NoNullsBean
    {
        @JsonInclude(JsonInclude.Include.NON_NULL)
        public String getA() { return null; }

        public String getB() { return null; }
    }

    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    static class NonDefaultBean
    {
        String _a = "a", _b = "b";

        NonDefaultBean() { }

        public String getA() { return _a; }
        public String getB() { return _b; }
    }

    // [databind#998]: Do not require no-arg constructor; but if not, defaults check
    //    has weaker interpretation
    @JsonPropertyOrder({ "x", "y", "z" })
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    static class NonDefaultBeanXYZ
    {
        public int x;
        public int y = 3;
        public int z = 7;

        NonDefaultBeanXYZ(int x, int y, int z) {
            this.x = x;
            this.y = y;
            this.z = z;
        }
    }

    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    static class MixedBean
    {
        String _a = "a", _b = "b";

        MixedBean() { }

        public String getA() { return _a; }

        @JsonInclude(JsonInclude.Include.NON_NULL)
        public String getB() { return _b; }
    }

    // to ensure that default values work for collections as well
    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    static class ListBean {
        public List<String> strings = new ArrayList<String>();
    }

    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    static class ArrayBean {
        public int[] ints = new int[] { 1, 2 };
    }

    // Test to ensure that default exclusion works for fields too
    @JsonPropertyOrder({ "i1", "i2" })
    static class DefaultIntBean {
        @JsonInclude(JsonInclude.Include.NON_DEFAULT)
        public int i1;

        @JsonInclude(JsonInclude.Include.NON_DEFAULT)
        public Integer i2;

        public DefaultIntBean(int i1, Integer i2) {
            this.i1 = i1;
            this.i2 = i2;
        }
    }

    static class NonEmptyString {
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        public String value;

        public NonEmptyString(String v) { value = v; }
    }

    static class NonEmptyInt {
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        public int value;

        public NonEmptyInt(int v) { value = v; }
    }

    static class NonEmptyDouble {
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        public double value;

        public NonEmptyDouble(double v) { value = v; }
    }

    static class NonEmpty<T> {
        @JsonInclude(JsonInclude.Include.NON_EMPTY)
        public T value;

        public NonEmpty(T v) { value = v; }
    }

    static class NonEmptyDate extends NonEmpty<Date> {
        public NonEmptyDate(Date v) { super(v); }
    }
    static class NonEmptyCalendar extends NonEmpty<Calendar> {
        public NonEmptyCalendar(Calendar v) { super(v); }
    }

    static class NonDefault<T> {
        @JsonInclude(JsonInclude.Include.NON_DEFAULT)
        public T value;

        public NonDefault(T v) { value = v; }
    }

    static class NonDefaultDate extends NonDefault<Date> {
        public NonDefaultDate(Date v) { super(v); }
    }
    static class NonDefaultCalendar extends NonDefault<Calendar> {
        public NonDefaultCalendar(Calendar v) { super(v); }
    }

    // [databind#1351]

    static class Issue1351Bean
    {
        public final String first;
        public final double second;

        public Issue1351Bean(String first, double second) {
            this.first = first;
            this.second = second;
        }
    }

    @JsonInclude(JsonInclude.Include.NON_DEFAULT)
    static abstract class Issue1351NonBeanParent
    {
        protected final int num;

        protected Issue1351NonBeanParent(int num) {
            this.num = num;
        }

        @JsonProperty("num")
        public int getNum() {
            return num;
        }
    }

    static class Issue1351NonBean extends Issue1351NonBeanParent {
        private String str;

        @JsonCreator
        public Issue1351NonBean(@JsonProperty("num") int num) {
            super(num);
        }

        public String getStr() {
            return str;
        }

        public void setStr(String str) {
            this.str = str;
        }
    }

    /*
    /**********************************************************
    /* Test methods
    /**********************************************************
     */

    final private ObjectMapper MAPPER = newJsonMapper();

    public void testGlobal() throws IOException
    {
        Map<String,Object> result = writeAndMap(MAPPER, new SimpleBean());
        assertEquals(2, result.size());
        assertEquals("a", result.get("a"));
        assertNull(result.get("b"));
        assertTrue(result.containsKey("b"));
    }

    public void testNonNullByClass() throws IOException
    {
        Map<String,Object> result = writeAndMap(MAPPER, new NoNullsBean());
        assertEquals(1, result.size());
        assertFalse(result.containsKey("a"));
        assertNull(result.get("a"));
        assertTrue(result.containsKey("b"));
        assertNull(result.get("b"));
    }

    public void testNonDefaultByClass() throws IOException
    {
        NonDefaultBean bean = new NonDefaultBean();
        // need to change one of defaults
        bean._a = "notA";
        Map<String,Object> result = writeAndMap(MAPPER, bean);
        assertEquals(1, result.size());
        assertTrue(result.containsKey("a"));
        assertEquals("notA", result.get("a"));
        assertFalse(result.containsKey("b"));
        assertNull(result.get("b"));
    }

    // [databind#998]
    public void testNonDefaultByClassNoCtor() throws IOException
    {
        NonDefaultBeanXYZ bean = new NonDefaultBeanXYZ(1, 2, 0);
        String json = MAPPER.writeValueAsString(bean);
        assertEquals(a2q("{'x':1,'y':2}"), json);
    }

    public void testMixedMethod() throws IOException
    {
        MixedBean bean = new MixedBean();
        bean._a = "xyz";
        bean._b = null;
        Map<String,Object> result = writeAndMap(MAPPER, bean);
        assertEquals(1, result.size());
        assertEquals("xyz", result.get("a"));
        assertFalse(result.containsKey("b"));

        bean._a = "a";
        bean._b = "b";
        result = writeAndMap(MAPPER, bean);
        assertEquals(1, result.size());
        assertEquals("b", result.get("b"));
        assertFalse(result.containsKey("a"));
    }

    public void testDefaultForEmptyList() throws IOException
    {
        assertEquals("{}", MAPPER.writeValueAsString(new ListBean()));
    }

    // NON_DEFAULT shoud work for arrays too
    public void testNonEmptyDefaultArray() throws IOException
    {
        assertEquals("{}", MAPPER.writeValueAsString(new ArrayBean()));
    }

    public void testDefaultForIntegers() throws IOException
    {
        assertEquals("{}", MAPPER.writeValueAsString(new DefaultIntBean(0, Integer.valueOf(0))));
        assertEquals("{\"i2\":1}", MAPPER.writeValueAsString(new DefaultIntBean(0, Integer.valueOf(1))));
        assertEquals("{\"i1\":3}", MAPPER.writeValueAsString(new DefaultIntBean(3, Integer.valueOf(0))));
    }

    public void testEmptyInclusionScalars() throws IOException
    {
        ObjectMapper defMapper = MAPPER;
        ObjectMapper inclMapper = new ObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_EMPTY);

        // First, Strings
        StringWrapper str = new StringWrapper("");
        assertEquals("{\"str\":\"\"}", defMapper.writeValueAsString(str));
        assertEquals("{}", inclMapper.writeValueAsString(str));
        assertEquals("{}", inclMapper.writeValueAsString(new StringWrapper()));

        assertEquals("{\"value\":\"x\"}", defMapper.writeValueAsString(new NonEmptyString("x")));
        assertEquals("{}", defMapper.writeValueAsString(new NonEmptyString("")));

        // Then numbers
        // 11-Nov-2015, tatu: As of Jackson 2.7, scalars should NOT be considered empty,
        //   except for wrappers if they are `null`
        assertEquals("{\"value\":12}", defMapper.writeValueAsString(new NonEmptyInt(12)));
        assertEquals("{\"value\":0}", defMapper.writeValueAsString(new NonEmptyInt(0)));

        assertEquals("{\"value\":1.25}", defMapper.writeValueAsString(new NonEmptyDouble(1.25)));
        assertEquals("{\"value\":0.0}", defMapper.writeValueAsString(new NonEmptyDouble(0.0)));

        IntWrapper zero = new IntWrapper(0);
        assertEquals("{\"i\":0}", defMapper.writeValueAsString(zero));
        assertEquals("{\"i\":0}", inclMapper.writeValueAsString(zero));
    }

    // [databind#1351], [databind#1417]
    public void testIssue1351() throws Exception
    {
        ObjectMapper mapper = new ObjectMapper();
        mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
        assertEquals(a2q("{}"),
                mapper.writeValueAsString(new Issue1351Bean(null, (double) 0)));
        // [databind#1417]
        assertEquals(a2q("{}"),
                mapper.writeValueAsString(new Issue1351NonBean(0)));
    }

    // [databind#1550]
    public void testInclusionOfDate() throws Exception
    {
        final Date input = new Date(0L);
        assertEquals(a2q("{'value':0}"),
                MAPPER.writeValueAsString(new NonEmptyDate(input)));
        assertEquals("{}",
                MAPPER.writeValueAsString(new NonDefaultDate(input)));

    }

    // [databind#1550]
    public void testInclusionOfCalendar() throws Exception
    {
        final Calendar input = new GregorianCalendar();
        input.setTimeInMillis(0L);
        assertEquals(a2q("{'value':0}"),
                MAPPER.writeValueAsString(new NonEmptyCalendar(input)));
        assertEquals("{}",
                MAPPER.writeValueAsString(new NonDefaultCalendar(input)));
    }
}


text:
it("component fill slot", function (done) {
    // [inject] init

    var input = wrap.getElementsByTagName('input')[0];
    expect(input.value).toBe('er');
    expect(wrap.getElementsByTagName('b')[0].title).toBe('er');

    myComponent.data.set('searchValue', 'san');

    san.nextTick(function () {
        var input = wrap.getElementsByTagName('input')[0];
        expect(input.value).toBe('san');
        expect(wrap.getElementsByTagName('b')[0].title).toBe('san');

        myComponent.dispose();
        document.body.removeChild(wrap);
        done();
    });
});

redpajama_set_name: RedPajamaGithub


text:
package com.vishnus1224.rxjavateamworkclient.client;

import java.text.ParseException;

/**
 * Allows for passing the createdAfterTime param to a query.
 * Created by Vishnu on 8/27/2016.
 */
interface CreatedAfterTime<Type> {

    /**
     * Sets the createdAfterTime query param.
     * @param timeString time string in HH:MM format.
     * @return type instance that implements the interface.
     * @throws ParseException if the time is in the wrong format.
     */
    Type createdAfterTime(String timeString) throws ParseException;
}


text:
html, body {
  font-family: 'Roboto', 'Helvetica', sans-serif;
}

.demo-card-image.mdl-card {
    width: 256px;
    height: 170px;
    margin: 8px;
}
.demo-card-image > .mdl-card__actions {
    height: 52px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
}
.demo-card-image__filename {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* Drawer */
.drawer {
    background-image: url('images/admin-header-bg.jpg');
    background-repeat: no-repeat;
}

.drawer header {
    box-sizing: border-box;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    padding: 16px;
    height: 151px;
}
.drawer header .line {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    position: relative;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    width: 100%;
}

.drawer header .avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
}

.drawer header .username {
    padding-left: 16px;
}

.drawer header .sign-in {
    display: inline-block;
    background: #4285f4;
    color: white;
    width: 190px;
    border-radius: 5px;
    white-space: nowrap;
}
.drawer header .sign-in:hover {
    cursor: pointer;
}

.drawer header .sign-in span {
    font-weight: bold;
}

.drawer header .sign-in span.icon{
    background: url('images/g-normal.png') transparent 5px 50% no-repeat;
    display: inline-block;
    vertical-align: middle;
    width: 42px;
    height: 42px;
    border-right: #2265d4 1px solid;
}

.drawer header .sign-in span.label{
    display: inline-block;
    vertical-align: middle;
    padding-left: 42px;
    padding-right: 42px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

.demo-layout .demo-header .mdl-textfield {
  padding-top: 27px;
}
.demo-layout .mdl-layout__header .mdl-layout__drawer-button {
  color: rgba(0, 0, 0, 0.54);
}
.mdl-layout__drawer .avatar {
  margin-bottom: 16px;
}
.drawer {
  border: none;
}
/* iOS Safari specific workaround */
.drawer .mdl-menu__container {
  z-index: -1;
}
.drawer .demo-navigation {
  z-index: -2;
}
/* END iOS Safari specific workaround */
.drawer .mdl-menu .mdl-menu__item {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
}

.demo-navigation {
  -webkit-box-flex: 1;
  -webkit-flex-grow: 1;
      -ms-flex-positive: 1;
          flex-grow: 1;
  position: relative;
}

.demo-navigation .active {
    background-color: rgba(0, 188, 212, 0.21);
}

.demo-layout .demo-navigation .mdl-navigation__link {
  display: -webkit-box !important;
  display: -webkit-flex !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -webkit-flex-direction: row;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  color: rgba(255, 255, 255, 0.56);
  font-weight: 500;
}
.demo-layout .demo-navigation .mdl-navigation__link:hover {
  background-color: #00BCD4;
  color: #37474F;
}
.demo-navigation .mdl-navigation__link .material-icons {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.56);
  margin-right: 32px;
}

.demo-navigation .add {
    position: absolute;
    bottom: 0px;
    right: 0px;
    margin-right: 36px;
    margin-bottom: 36px;
    z-index: 999;
}

.demo-content {
  max-width: 1080px;
}

.demo-charts {
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
}
.demo-chart:nth-child(1) {
  color: #ACEC00;
}
.demo-chart:nth-child(2) {
  color: #00BBD6;
}
.demo-chart:nth-child(3) {
  color: #BA65C9;
}
.demo-chart:nth-child(4) {
  color: #EF3C79;
}
.demo-graphs {
  padding: 16px 32px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: stretch;
  -webkit-align-items: stretch;
      -ms-flex-align: stretch;
          align-items: stretch;
}
/* TODO: Find a proper solution to have the graphs
 * not float around outside their container in IE10/11.
 * Using a browserhacks.com solution for now.
 */
_:-ms-input-placeholder, :root .demo-graphs {
  min-height: 664px;
}
_:-ms-input-placeholder, :root .demo-graph {
  max-height: 300px;
}
/* TODO end */
.demo-graph:nth-child(1) {
  color: #00b9d8;
}
.demo-graph:nth-child(2) {
  color: #d9006e;
}

.demo-cards {
  -webkit-box-align: start;
  -webkit-align-items: flex-start;
      -ms-flex-align: start;
          align-items: flex-start;
  -webkit-align-content: flex-start;
      -ms-flex-line-pack: start;
          align-content: flex-start;
}
.demo-cards .demo-separator {
  height: 32px;
}
.demo-cards .mdl-card__title.mdl-card__title {
  color: white;
  font-size: 24px;
  font-weight: 400;
}
.demo-cards ul {
  padding: 0;
}
.demo-cards h3 {
  font-size: 1em;
}
.demo-updates .mdl-card__title {
  min-height: 200px;
  background-image: url('../images/dog.png');
  background-position: 90% 100%;
  background-repeat: no-repeat;
}
.demo-cards .mdl-card__actions a {
  color: #00BCD4;
  text-decoration: none;
}

.demo-options h3 {
  margin: 0;
}
.demo-options .mdl-checkbox__box-outline {
  border-color: rgba(255, 255, 255, 0.89);
}
.demo-options ul {
  margin: 0;
  list-style-type: none;
}
.demo-options li {
  margin: 4px 0;
}

.demo-options .mdl-textfield {
    padding: 10px 0;
}

.demo-options .mdl-textfield__label {
    top: 12px;
}

.mdl-textfield__label:after {
    bottom: 10px; }

.demo-options .material-icons {
  color: rgba(255, 255, 255, 0.89);
}
.demo-options .mdl-card__actions {
  height: 64px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  box-sizing: border-box;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
}

#view-source {
    position: fixed;
    display: block;
    right: 0;
    bottom: 0;
    margin-right: 40px;
    margin-bottom: 40px;
    z-index: 900;
    visibility: hidden;
}


text:
package com.sun.tools.ws.test.processor.modeler.annotation;

import jakarta.jws.WebService;

/**
 *
 * @author lukas
 */
@WebService
public class RemoteReturnTestWs {

    public RemoteReturn operation() {
        return null;
    }

}


text:
"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.styles = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));

var React = _interopRequireWildcard(require("react"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _clsx = _interopRequireDefault(require("clsx"));

var _withStyles = _interopRequireDefault(require("../styles/withStyles"));

var _Typography = _interopRequireDefault(require("../Typography"));

var _StepIcon = _interopRequireDefault(require("../StepIcon"));

var _StepperContext = _interopRequireDefault(require("../Stepper/StepperContext"));

var _StepContext = _interopRequireDefault(require("../Step/StepContext"));

const styles = theme => ({
  /* Styles applied to the root element. */
  root: {
    display: 'flex',
    alignItems: 'center',
    '&$alternativeLabel': {
      flexDirection: 'column'
    },
    '&$disabled': {
      cursor: 'default'
    }
  },

  /* Styles applied to the root element if `orientation="horizontal"`. */
  horizontal: {},

  /* Styles applied to the root element if `orientation="vertical"`. */
  vertical: {
    textAlign: 'left',
    padding: '8px 0'
  },

  /* Styles applied to the `Typography` component which wraps `children`. */
  label: {
    transition: theme.transitions.create('color', {
      duration: theme.transitions.duration.shortest
    }),
    '&$active': {
      color: theme.palette.text.primary,
      fontWeight: 500
    },
    '&$completed': {
      color: theme.palette.text.primary,
      fontWeight: 500
    },
    '&$alternativeLabel': {
      textAlign: 'center',
      marginTop: 16
    },
    '&$error': {
      color: theme.palette.error.main
    }
  },

  /* Pseudo-class applied to the `Typography` component if `active={true}`. */
  active: {},

  /* Pseudo-class applied to the `Typography` component if `completed={true}`. */
  completed: {},

  /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */
  error: {},

  /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */
  disabled: {},

  /* Styles applied to the `icon` container element. */
  iconContainer: {
    flexShrink: 0,
    // Fix IE11 issue
    display: 'flex',
    paddingRight: 8,
    '&$alternativeLabel': {
      paddingRight: 0
    }
  },

  /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */
  alternativeLabel: {},

  /* Styles applied to the container element which wraps `Typography` and `optional`. */
  labelContainer: {
    width: '100%',
    color: theme.palette.text.secondary
  }
});

exports.styles = styles;
const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(props, ref) {
  const {
    children,
    classes,
    className,
    error = false,
    icon: iconProp,
    optional,
    StepIconComponent: StepIconComponentProp,
    StepIconProps
  } = props,
        other = (0, _objectWithoutPropertiesLoose2.default)(props, ["children", "classes", "className", "error", "icon", "optional", "StepIconComponent", "StepIconProps"]);
  const {
    alternativeLabel,
    orientation
  } = React.useContext(_StepperContext.default);
  const {
    active,
    disabled,
    completed,
    icon: iconContext
  } = React.useContext(_StepContext.default);
  const icon = iconProp || iconContext;
  let StepIconComponent = StepIconComponentProp;

  if (icon && !StepIconComponent) {
    StepIconComponent = _StepIcon.default;
  }

  return /*#__PURE__*/React.createElement("span", (0, _extends2.default)({
    className: (0, _clsx.default)(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error),
    ref: ref
  }, other), icon || StepIconComponent ? /*#__PURE__*/React.createElement("span", {
    className: (0, _clsx.default)(classes.iconContainer, alternativeLabel && classes.alternativeLabel)
  }, /*#__PURE__*/React.createElement(StepIconComponent, (0, _extends2.default)({
    completed: completed,
    active: active,
    error: error,
    icon: icon
  }, StepIconProps))) : null, /*#__PURE__*/React.createElement("span", {
    className: classes.labelContainer
  }, children ? /*#__PURE__*/React.createElement(_Typography.default, {
    variant: "body2",
    component: "span",
    display: "block",
    className: (0, _clsx.default)(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error)
  }, children) : null, optional));
});
process.env.NODE_ENV !== "production" ? StepLabel.propTypes = {
  // ----------------------------- Warning --------------------------------
  // | These PropTypes are generated from the TypeScript type definitions |
  // |     To update them edit the d.ts file and run "yarn proptypes"     |
  // ----------------------------------------------------------------------

  /**
   * In most cases will simply be a string containing a title for the label.
   */
  children: _propTypes.default.node,

  /**
   * Override or extend the styles applied to the component.
   */
  classes: _propTypes.default.object,

  /**
   * @ignore
   */
  className: _propTypes.default.string,

  /**
   * Mark the step as failed.
   * @default false
   */
  error: _propTypes.default.bool,

  /**
   * Override the default label of the step icon.
   */
  icon: _propTypes.default.node,

  /**
   * The optional node to display.
   */
  optional: _propTypes.default.node,

  /**
   * The component to render in place of the [`StepIcon`](/api/step-icon/).
   */
  StepIconComponent: _propTypes.default.elementType,

  /**
   * Props applied to the [`StepIcon`](/api/step-icon/) element.
   */
  StepIconProps: _propTypes.default.object
} : void 0;
StepLabel.muiName = 'StepLabel';

var _default = (0, _withStyles.default)(styles, {
  name: 'MuiStepLabel'
})(StepLabel);

exports.default = _default;


text:
namespace ash {
namespace test {

void TestUserWallpaperDelegate::UpdateWallpaper() {
  DefaultUserWallpaperDelegate::UpdateWallpaper();
  update_wallpaper_count_ ++;
}

int TestUserWallpaperDelegate::GetUpdateWallpaperCountAndReset() {
  int count = update_wallpaper_count_;
  update_wallpaper_count_ = 0;
  return count;
}

}  // namespace test
}  // namespace ash


text:
package com.microsoft.azure.management.logic.v2018_07_01_preview.implementation;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.azure.management.logic.v2018_07_01_preview.Expression;

/**
 * The ExpressionRootInner model.
 */
public class ExpressionRootInner extends Expression {
    /**
     * The path.
     */
    @JsonProperty(value = "path")
    private String path;

    /**
     * Get the path.
     *
     * @return the path value
     */
    public String path() {
        return this.path;
    }

    /**
     * Set the path.
     *
     * @param path the path value to set
     * @return the ExpressionRootInner object itself.
     */
    public ExpressionRootInner withPath(String path) {
        this.path = path;
        return this;
    }

}


text:
{% extends "forum/forum_base.html" %}
{% load i18n forum avatar_tags %}

{% block breadcrumb %}{{ block.super }}
{% trans "Forum Index" %}
{% endblock breadcrumb %}

{% block latest_topics %}

{% trans "Latest Topic" %}

  {% include "forum/includes/topic_list.html" %}

Read More

{% endblock latest_topics %}

{% block forum %}

{% for category in categories %}

{{ category }}:

    {% for forum in category.forum_set.all %}
      {{ forum.name }} |
    {% endfor %}

{% endfor %}

{% endblock forum %}

{% block forums %}

{{ FORUM_TITLE }}

    {% for category in categories %}

{{ category }}

          {% trans "topics" %},
          {% trans "posts" %},
          {% trans "last post" %}

    {% for forum in category.forum_set.all %}

{{ forum }}

{{ forum.description }}

            {{ forum.num_topics }}  {% trans "topics" %}

            {{ forum.num_posts }}  {% trans "posts" %}

            {% trans "Last post" %}:
            {{ forum.get_last_post.update|timesince }}
            by {{ forum.get_last_post.posted_by }}

    {% endfor %}

  {% endfor %}

Forum statistics

        {% trans "Total number of registered users" %}: {{ total_users }}

        {% trans "Newest registered user" %}:
          {{ last_registered_user.username }}

        {% trans "Total number of topics" %}: {{ total_topics }}

        {% trans "Total number of posts" %}:  {{ total_posts }}

        {% trans "Currently online" %}  {{ total_onlines }}  (  {{ total_onlines_guest }}  {% trans "guests" %}, {{ total_onlines_user }} {% trans "registered user" %} )

{% endblock forums %}


text:
import React from "react"
import { assert } from "chai"
import { mount } from "enzyme"
import { Provider } from "react-redux"
import R from "ramda"

import ChannelMembersPage, {
  CHANNEL_MEMBERS_PAGE_SIZE,
  getSortOption
} from "./ChannelMembersPage"
import SearchResult from "../components/SearchResult"

import IntegrationTestHelper from "../util/integration_test_helper"
import { makeChannel } from "../factories/channels"
import { makeSearchResponse } from "../factories/search"
import { MEMBERS_SORT_AUTHOR_NAME, MEMBERS_SORT_JOIN_DATE } from "../lib/picker"

describe("ChannelMembersPage", () => {
  let helper, renderPage, searchResponse, initialState, channel

  beforeEach(() => {
    channel = makeChannel()
    searchResponse = makeSearchResponse(
      CHANNEL_MEMBERS_PAGE_SIZE,
      CHANNEL_MEMBERS_PAGE_SIZE + 40,
      "profile"
    )
    helper = new IntegrationTestHelper()
    helper.searchStub.returns(Promise.resolve(searchResponse))
    initialState = {
      search: {
        loaded: true,
        data:   {
          results:     searchResponse.hits.hits,
          total:       searchResponse.hits.total,
          incremental: false
        }
      }
    }

    renderPage = () =>
      mount(
        <Provider store={helper.createMockStore(initialState)}>
          <ChannelMembersPage channelName={channel.name} />
        </Provider>
      )
  })

  afterEach(() => {
    helper.cleanup()
  })

  it("should render results using SearchResult in a Grid", () => {
    const page = renderPage()
    assert.ok(page.find("Grid").exists())
    assert.lengthOf(page.find(SearchResult), searchResponse.hits.hits.length)
    assert.lengthOf(page.find("Cell"), searchResponse.hits.hits.length)
    // $FlowFixMe: flow thinks page.find doesn't return an interator
    R.zip([...page.find(SearchResult)], searchResponse.hits.hits).forEach(
      ([el, result]) => {
        assert.equal(el.props["result"], result)
      }
    )
  })

  it("should use the InfiniteScroll to fetch more", () => {
    const page = renderPage()
    assert.equal(helper.searchStub.callCount, 1)
    page.find("InfiniteScroll").prop("loadMore")()
    assert.equal(helper.searchStub.callCount, 2)
  })

  it("should have a dropdown for selecting the sort", () => {
    const picker = renderPage().find("ChannelMembersSortPicker")
    assert.equal(picker.prop("value"), MEMBERS_SORT_AUTHOR_NAME)
    assert.equal(helper.searchStub.callCount, 1)
    picker.prop("updatePickerParam")(MEMBERS_SORT_JOIN_DATE)()
    assert.equal(helper.searchStub.callCount, 2)
  })

  //
  ;[
    [MEMBERS_SORT_AUTHOR_NAME, "asc"],
    [
      MEMBERS_SORT_JOIN_DATE,
      {
        order:         "desc",
        nested_path:   "author_channel_join_data",
        nested_filter: {
          term: {
            "author_channel_join_data.name": "worst-channel-ever.jpg"
          }
        }
      }
    ]
  ].forEach(([sortField, expectation]) => {
    it(`getSortOption returns what we want for ${sortField}`, () => {
      assert.deepEqual(
        getSortOption(sortField, "worst-channel-ever.jpg"),
        expectation
      )
    })
  })
})


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package de.fuberlin.wiwiss.silk.config

import xml.Node
import de.fuberlin.wiwiss.silk.util.Identifier
import de.fuberlin.wiwiss.silk.entity.SparqlRestriction

/**
 * Defines a dataset.
 *
 * @param sourceId The id of the source
 * @param variable Each data item will be bound to this variable.
 * @param restriction Restricts this dataset to specific resources.
 */
case class Dataset(sourceId: Identifier, variable: String, restriction: SparqlRestriction) {
  require(!variable.isEmpty, "Variable must be non-empty")

  /**
   * Serializes this dataset specification as XML.
   *
   * @param asSource If true, this dataset will be serialized as a source dataset. If false it will be serialize as target dataset.
   */
  def toXML(asSource: Boolean) = {
    if (asSource) {
      <SourceDataset dataSource={sourceId} var={restriction.variable}>
        <RestrictTo>
          {restriction.toSparql}
        </RestrictTo>
      </SourceDataset>
    }
    else {
      <TargetDataset dataSource={sourceId} var={restriction.variable}>
        <RestrictTo>
          {restriction.toSparql}
        </RestrictTo>
      </TargetDataset>
    }
  }
}

object Dataset {
  /**
   * Creates a DatasetSpecification from XML.
   */
  def fromXML(node: Node)(implicit prefixes: Prefixes): Dataset = {
    val variable = (node \ "@var").text

    Dataset(
      sourceId = (node \ "@dataSource").text,
      variable = variable,
      restriction = SparqlRestriction.fromSparql(variable, (node \ "RestrictTo").text.trim)
    )
  }

  def empty = Dataset(Identifier.random, "x", SparqlRestriction.empty)
}


text:
<resources>
    <string name="app_name">DaData</string>

    <string name="your_address">Ваш адрес:</string>
</resources>


text:
(function () {
    'use strict';

    angular
        .module('app.read.decrypt')
        .controller('DecryptController', DecryptController);

    //controller for shared note decryption dialog
    DecryptController.$inject = ['SjclService', '$mdDialog', '$mdToast', 'noteToDecrypt'];
    function DecryptController(SjclService, $mdDialog, $mdToast, noteToDecrypt) {
        var vm = this;

        vm.password = '';

        //wrapper for mdToast
        function showToast(text, type) {
            $mdToast.show(
                $mdToast.simple()
                    .textContent(text)
                    .position('top right')
                    .hideDelay(6000)
                    .toastClass(type)
            );
        }

        vm.closeDialog = function () {
            $mdDialog.cancel();
        };

        vm.decryptNote = function () {
            try {
                //try to decrypt and pass decrypted note for promise resolve
                var decrypted = SjclService.decrypt(vm.password, noteToDecrypt.Data);
                $mdDialog.hide(angular.fromJson(decrypted));
            }
            catch (e) {
                showToast('Was not able to decrypt note with given password', 'error');
            }
        };
    }
})();


text:
require 'helper'

class TestBlockExecutionException < StandardError
end

class TestLifeline < Test::Unit::TestCase
  include Lifeline

  context "get_process_list" do
    should "return an array of process hashes" do
      processes = get_process_list
      assert_kind_of(Array, processes)
      processes.all? do |p|
        assert_kind_of(Hash, p)
        assert_not_nil p[:pid]
        assert_kind_of(Integer, p[:pid])
        assert_not_nil p[:command]
        assert_kind_of(String, p[:command])
      end
    end

    context '' do
      setup do
ps_output = <<EOF
 2070 ps ax -o pid,command
10096 searchd --pidfile --config /mnt/apps/doc_viewer/releases/20100329193155/config/internal_production.sphinx.conf
EOF
        self.expects(:get_processes_from_shell).returns(ps_output)
        @processes = get_process_list
      end

      should "handle whitespace in the front of the PID correctly" do
        assert @processes.any? {|x| x[:pid] == 2070}
      end

      should "handle a lack of whitespace in front of the PID correctly" do
        assert @processes.any? {|x| x[:pid] == 10096}
      end
    end
  end

  context "lifeline" do
    should "raise an ArgumentError when not passed a block" do
      assert_raise(ArgumentError) { lifeline }
    end

    context "when the process list is empty" do
      setup do
        self.expects(:get_process_list).returns(nil)
      end

      should "raise a RuntimeError and exit without executing the block" do
        assert_raise(RuntimeError) do
          lifeline do
            flunk "This block should not be executed"
          end
        end
      end
    end

    context "when the process list does not contain the PID for this process" do
      setup do
        self.expects(:get_process_list).returns([{:pid => $$+1, :command => "random commmand"}])
      end

      should "raise a RuntimeError and exit" do
        assert_raise(RuntimeError) do
          lifeline do
            flunk "This block should not be executed"
          end
        end
      end
    end

    context "when there is no other process with the same command (different pid) as this one" do
      should "execute the provided block" do
        assert_raise(TestBlockExecutionException) do
          lifeline do
            raise TestBlockExecutionException, "This block throws an exception to show the block was run"
          end
        end
      end
    end

    context "when there is another process with the same command (different pid)" do
      setup do
        @processes = get_process_list
        my_process = @processes.detect {|p| p[:pid] == $$}
        assert_not_nil my_process
        @processes << {:pid => $$ + 10, :command => my_process[:command]}
        self.expects(:get_process_list).returns(@processes)
      end

      should "not execute the provided block" do
        lifeline do
          flunk "This block should not be executed"
        end
      end
    end
  end

  context "define_lifeline_tasks" do
    setup do
      define_lifeline_tasks("awesome:namespace") do
        raise TestBlockExecutionException, "This block throws an exception to show the block was run"
      end
    end

    should "create an awesome:namespace:run task" do
      assert_raise(TestBlockExecutionException) do
        Rake::Task["awesome:namespace:run"].invoke
      end
    end

    should "create an awesome:namespace:lifeline task" do
      assert_not_nil Rake::Task["awesome:namespace:lifeline"]
    end

    should "create an awesome:namespace:terminate task" do
      assert_not_nil Rake::Task["awesome:namespace:terminate"]
    end
  end
end


text: Tool writen in go to generate names that following a naming-scheme.


text:
import React, { Component } from 'react'
import { connect } from 'react-redux'

import Image from '../components/Image'
import Rectangle from '../components/Rectangle'

import Animator from './Animator'

import styles from './section.css'

const ANIMATION_LAYER = {
  delay: 0,
  enter: {
    type: 'fadeIn',
    duration: 500
  },
  leave: {
    type: 'fadeOut',
    duration: 500
  }
}

export default class Section extends Component {
  constructor(props){
    super(props)
    this.createLayers = this.createLayers.bind(this)
  }

  componentWillMount() {
    this.section = this.createLayers()
  }

  createLayers() {
    const layers = this.props.layers
    let layerList = (layers && Array !== layers.constructor) ? [layers] : layers

    return layerList.map( (layer,i) =>
      (<Animator key={i} name={layer.name} bounds={layer.bounds}
                 id={this.props.id} animation={ANIMATION_LAYER}>
          {layer.elements.map((elm,j) => this.createComponent(elm,j))}
        </Animator>)
    )
  }

  createComponent(element,j) {
    let NewComponent
    if( element.format ){
      NewComponent = Image
    } else {
      NewComponent = Rectangle
    }
    const { name, bounds, style, animation, ...res } = element
    const { height, width, ...restStyle} = style
    return (
      <Animator key={j} id={this.props.id} name={name} bounds={bounds} animation={animation}
                style={Object.assign({},style,{position: 'absolute',display:'flex'})}>
        <NewComponent { ...res } style={Object.assign({},restStyle,{flex:1})}/>
      </Animator>
    )
  }

  render() {
    return (

        {this.section}

      /*
      <div style={{height:this.props.style.height*this.props.scale,
                  width: this.props.style.width*this.props.scale,
                  position:'relative',
                  transitionDuration: this.props.transitionDuration,
                  transform: `translate3d(0,-${this.props.subSection + this.props.distanceX}px,0)` }}>
        {this.section}

      */
    )
  }
}

/*
const mapStateToProps = (state, ownProps) => {
  return {
    scale: state.viewer.scale
    subSection: state.viewer.subSection,
    distanceY: state.viewer.distanceY
  }
}

export default connect(mapStateToProps)(Section)
*/


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gson;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.lang.reflect.Type;
import java.util.Map;
import sample.pojo.Student;

/**
 *
 * @author SPathirana
 */
public class GsonManager {

    public static Object getContext(Map<Type, Object> compositeObjectAdapterMap, String jsonFilePath, Type type) {
        Gson gson = createGsonBuilder(compositeObjectAdapterMap, false);
        return gson.fromJson(jsonFilePath, type);
    }

    public static Gson createGsonBuilder(Map<Type, Object> compositeObjectAdapterMap, boolean isPrettyPrinting) {
        GsonBuilder gsonBuilder = new GsonBuilder();

        if (isPrettyPrinting) {
            //===== Json Output is organized====
            gsonBuilder.setPrettyPrinting();
            //===================================
        }
        // =============Adding Composite Objects to the Gson Builder=================
        if (compositeObjectAdapterMap != null) {
            compositeObjectAdapterMap.forEach((Type t, Object object) -> gsonBuilder.registerTypeAdapter(t, object));
        }
        // =============Java 8 -> Lambda Expressions have been used==================
        Gson gson = gsonBuilder.create();
        return gson;
    }

    public static String getJsonString(Map<Type, Object> compositeObjectAdapterMap, Student student, boolean isPrettyPrinting) {
        Gson gson = createGsonBuilder(compositeObjectAdapterMap, isPrettyPrinting);
        return gson.toJson(student);
    }
}


text:
package com.google.sprint1;

import java.util.ArrayList;

import android.util.Log;

import com.metaio.sdk.jni.IGeometry;
import com.metaio.sdk.jni.Rotation;
import com.metaio.sdk.jni.Vector3d;

public class Aim extends Drawable
{

	public static final String TAG = "Aim";
	private IGeometry crosshair;
	private boolean powerUp;
	private ArrayList<IGeometry> ballPath; // lista med bollar som visar parabeln för den flygande färgbollen
	private ArrayList<IGeometry> ballPathShadow; // skuggor till parabelsiktet

	//varibles for draw aim path
	Vector3d gravity;
	Vector3d position;
	float zVelocity;
	float timeToLanding;
	float deltaTime;
	float currentTime;

	/** constructor Aim */
	public Aim(IGeometry geo, ArrayList<IGeometry> ball, ArrayList<IGeometry> ballShadow) {
		super();
		powerUp = false;
		crosshair = geo;
		setGeometryProperties(crosshair, 4f, new Vector3d(0f, 0f, 2f),	new Rotation(0f, 0f, 0f));
		crosshair.setVisible(false);

		ballPath = ball;
		ballPathShadow = ballShadow;
		for (int i = 0; i < 10; i++)
		{
			setGeometryProperties(ballPath.get(i), 0.5f, GameState.getState().players.get(GameState.getState().myPlayerID).startPosition, new Rotation(0f, 0f, 0f)); //TODO set tower position values instead of hard code the values here
			setGeometryProperties(ballShadow.get(i), 0.2f, GameState.getState().players.get(GameState.getState().myPlayerID).startPosition, new Rotation(0f, 0f, 0f));

			ballPath.get(i).setVisible(false);
			ballShadow.get(i).setVisible(false);
		}

		gravity = new Vector3d(0f, 0f, -9.82f);
		position = new Vector3d(0f, 0f, 0f);
		zVelocity = 0;
		timeToLanding = 0;
		deltaTime = 0;
		currentTime = 0;
	}

	/** Function to draw the path of the ball (aim) */
	public void drawBallPath(Vector3d startVelocity, Vector3d startPosition)
	{
		if(!GameState.getState().havePowerUp)
			powerUp = false;

		zVelocity = startVelocity.getZ();
		timeToLanding = (float) (zVelocity / (2 * 9.82f) + Math.sqrt(Math.pow( zVelocity / (2 * 9.82), 2) + startPosition.getZ() / 9.82));
		//Log.d(TAG, "time to landing : " + timeToLanding);
		deltaTime = timeToLanding/(1+2+3+4+5+6+7+8+9);
		//Log.d(TAG, "delta time : " + deltaTime);
		currentTime = 0;

		// draw 9 balls in the path the paintball will fly
		// will increase the distance between balls the further away from the tower the ball gets.
		for (int i = 0; i < 9; i++)
		{
			// Calculate the objects position after "i" timestep
			currentTime += deltaTime*i;
			position.setX(startPosition.getX()+startVelocity.getX()*currentTime+gravity.getX()*currentTime*currentTime);
			position.setY(startPosition.getY()+startVelocity.getY()*currentTime+gravity.getY()*currentTime*currentTime);
			position.setZ(startPosition.getZ()+startVelocity.getZ()*currentTime+gravity.getZ()*currentTime*currentTime);

			//check for collision with ground
			if (position.getZ()<0f)
			{
			ballPath.get(i).setVisible(false);
			ballPathShadow.get(i).setVisible(false);
			//Log.d(TAG, "boll som försvinner: " + i + " currentTime: " + currentTime + " Z-led: " + position.getZ());
			}
			else
			{
				//Log.d(TAG, "boll som syns: " + i + " currentTime: " + currentTime);
				ballPath.get(i).setTranslation(position);
				ballPathShadow.get(i).setTranslation(new Vector3d(position.getX() , position.getY(),0f));
			}
		}
		// draw the last ball in ball path at the place where the ball will land
		position.setX(startPosition.getX()+startVelocity.getX()*timeToLanding+gravity.getX()*timeToLanding*timeToLanding);
		position.setY(startPosition.getY()+startVelocity.getY()*timeToLanding+gravity.getY()*timeToLanding*timeToLanding);
		position.setZ(0f);

		ballPath.get(9).setTranslation(position);
		ballPathShadow.get(9).setVisible(false);

		if (powerUp)
		{
			// place the crosshair
			crosshair.setTranslation(position);
		}
	}
	/**
	 * Set the aim geometrys visible
	 */
	public void activate()
	{
		if(powerUp)
		{
			crosshair.setVisible(true);
			crosshair.setTranslation(GameState.getState().players.get(GameState.getState().myPlayerID).startPosition);
		}

		 for(int i = 0; i < 10; i++)
         {
         	ballPath.get(i).setVisible(true);
         	ballPath.get(i).setTranslation(GameState.getState().players.get(GameState.getState().myPlayerID).startPosition);
         	ballPathShadow.get(i).setVisible(true);
         	ballPathShadow.get(i).setTranslation(GameState.getState().players.get(GameState.getState().myPlayerID).startPosition);
         }
	}

	/**
	 * Set the aim geometrys invisible
	 */
	public void deactivate()
	{
		 crosshair.setVisible(false);
		 for(int i = 0; i < 10; i++)
         {
         	ballPath.get(i).setVisible(false);
         	ballPathShadow.get(i).setVisible(false);
         }
	}

	/**
	 * return if powerUp is true or false
	 */
	public boolean getPowerUp()
	{
		return powerUp;
	}

	/**
	 * set powerUpp to true or false
	 */
	public void setPowerUp(boolean power)
	{
		powerUp = power;
	}
}


text:
import { LogMessage } from '../src/LogMessage';
import { WriteLogMessage } from '../src/WriteLogMessage';

export class TestWriter implements WriteLogMessage {

    logMessages: LogMessage[] = [];

    write(logMessage: LogMessage) {
        this.logMessages.push(logMessage);
    }
}


text:
    <mat-checkbox [(ngModel)]="disableButtonRipples">Disable button ripples</mat-checkbox>
    <button mat-button [disableRipple]="disableButtonRipples">flat</button>
    <button mat-raised-button [disableRipple]="disableButtonRipples">raised</button>
    <button mat-fab [disableRipple]="disableButtonRipples">
      <mat-icon>check</mat-icon>
    </button>
    <button mat-mini-fab [disableRipple]="disableButtonRipples">
      <mat-icon>check</mat-icon>
    </button>

Ripple overview example

  <ripple-overview-example></ripple-overview-example>


text:
class Everlog
  class Dom::Entity::Content < Dom::Entity
    require 'erb'

    def push(name, value)
      instance_variable_set("@#{name}", value)
    end

    def render
      template = File.open(File.dirname(__FILE__) + '/content.erb').read.delete("\n")
      ERB.new(template).result(binding)
    end
  end
end


text:
function(list_find_flags __list_find_flags_lst)
  map_new()
  ans(__list_find_flags_result)
  foreach(__list_find_flags_itm ${ARGN})
    list(FIND "${__list_find_flags_lst}" "${__list_find_flags_itm}" __list_find_flags_item)
    if(NOT "${__list_find_flags_item}" LESS 0)
      map_set(${__list_find_flags_result} "${__list_find_flags_itm}" true)
    endif()
  endforeach()
  return(${__list_find_flags_result})
endfunction()


text:
namespace ash {

// ArcKeymasterClient is used to bootstrap a Mojo connection with the
// arc-keymasterd daemon in Chrome OS.
class COMPONENT_EXPORT(ASH_DBUS_ARC) ArcKeymasterClient
    : public chromeos::DBusClient {
 public:
  // Returns the global instance if initialized. May return null.
  static ArcKeymasterClient* Get();

  // Creates and initializes the global instance. |bus| must not be null.
  static void Initialize(dbus::Bus* bus);

  // Creates and initializes a fake global instance.
  static void InitializeFake();

  // Destroys the global instance if it has been initialized.
  static void Shutdown();

  ArcKeymasterClient(const ArcKeymasterClient&) = delete;
  ArcKeymasterClient& operator=(const ArcKeymasterClient&) = delete;

  // Bootstrap the Mojo connection between Chrome and the keymaster service.
  // Should pass in the child end of the Mojo pipe.
  virtual void BootstrapMojoConnection(
      base::ScopedFD fd,
      chromeos::VoidDBusMethodCallback callback) = 0;

 protected:
  // Initialize() should be used instead.
  ArcKeymasterClient();
  ~ArcKeymasterClient() override;
};

}  // namespace ash

#endif  // CHROMEOS_ASH_COMPONENTS_DBUS_ARC_ARC_KEYMASTER_CLIENT_H_


text:
class NpathGen { // Unicursal grid filling path generator for Numbrix Generation
  public:
  // constructors
  NpathGen (int sizex = 9, int sizey = 0, int randseed = 0);
  ~NpathGen ();
  // accesors
  int getXSize () {return maxx;}
  int getYSize () {return maxy;}
  int getXY(int x, int y) {return board[x + y * maxx];}
  void setSeed (int s) {seed = s;}
  int getSeed () {return seed;}
  void setMask (int m) {mask = m;}
  int getMask () {return mask;}
  // Misc. Methods

  private:
  int maxx, maxy, start, end, seed, mask;
  int step[5];
  int* board;
  clock_t timer, secs;
  void generate ();
  int change();
};

class NSolver {
  public:
  NSolver (int x, int y, int** grid);
  ~NSolver ();
  int getSolutionXY (int x, int y, unsigned int n);
  int getSolutionXY (int x, int y) {return getSolutionXY (x, y, 0);}
  int getNumSolutions () {return solutions.size();}

  private:
  std::vector<int**> solutions;
  int sizex, sizey;
  int** puzzle;
  int* puzmask;
  int findrun();
  void wiggle (int x, int y, int num, signed int dir);
  void check (int x, int y, int num, signed int dir);
};

#endif // NUMBRIXGEN_H_INCLUDED


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

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE — CMake 3.8.1 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="CMAKE_SYSTEM_APPBUNDLE_PATH" href="CMAKE_SYSTEM_APPBUNDLE_PATH.html" />
    <link rel="prev" title="CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS" href="CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.8.1 Documentation »

cmake-variables(7) »

CMAKE_SUBLIME_TEXT_2_EXCLUDE_BUILD_TREE¶

If this variable evaluates to ON at the end of the top-level
CMakeLists.txt file, the Sublime Text 2 extra generator
excludes the build tree from the .sublime-project if it is inside the
source tree.

Previous topic

CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS

Next topic

CMAKE_SYSTEM_APPBUNDLE_PATH

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">

<input type="text" name="q" />

<input type="submit" value="Go" />

      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.8.1 Documentation »

cmake-variables(7) »

        © Copyright 2000-2017 Kitware, Inc. and Contributors.
      Created using Sphinx 1.5.2.


text:
<?php

declare(strict_types=1);

namespace phpDocumentor\Transformer\Writer;

use phpDocumentor\Descriptor\Descriptor;
use Traversable;
use function explode;
use function is_array;
use function is_object;
use function method_exists;

final class Pathfinder
{
    /**
     * Combines the query and an object to retrieve a list of nodes that are to be used as node-point in a template.
     *
     * This method interprets the provided query string and walks through the given object to find the correct
     * element. This method will silently fail if an invalid query was provided; in such a case the given object
     * is returned.
     *
     * @param Traversable<string, mixed>|Descriptor $object
     *
     * @return Traversable<mixed>|list<mixed>
     */
    public function find(object $object, string $query) : iterable
    {
        if ($query) {
            $node = $this->walkObjectTree($object, $query);

            if (!is_array($node) && (!$node instanceof Traversable)) {
                $node = [$node];
            }

            return $node;
        }

        return [$object];
    }

    /**
     * Walks an object graph and/or array using a twig query string.
     *
     * @param Traversable<string, mixed>|Descriptor $object
     * @param string $query A path to walk separated by dots, i.e. `namespace.namespaces`.
     *
     * @return mixed
     */
    private function walkObjectTree(object $object, string $query)
    {
        $node = $object;
        $elements = explode('.', $query);

        // walk through the tree
        foreach ($elements as $elementName) {
            if (is_array($node)) {
                if (isset($node[$elementName])) {
                    $node = $node[$elementName];
                    continue;
                }
            } elseif (is_object($node)) {
                if (isset($node->{$elementName}) || (method_exists($node, '__get') && $node->{$elementName})) {
                    $node = $node->{$elementName};
                    continue;
                }

                if (method_exists($node, $elementName)) {
                    $node = $node->{$elementName}();
                    continue;
                }

                if (method_exists($node, 'get' . $elementName)) {
                    $elementName = 'get' . $elementName;
                    $node = $node->{$elementName}();
                    continue;
                }

                if (method_exists($node, 'is' . $elementName)) {
                    $elementName = 'is' . $elementName;
                    $node = $node->{$elementName}();
                    continue;
                }
            }

            return null;
        }

        return $node;
    }
}


text:
<?php

declare(strict_types=1);

namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Validation\Constraints\FieldConstraints;

use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;

class DomainNameValidator extends ConstraintValidator
{

    /**
     * Checks if the passed value is valid.
     *
     * @param string     $domainName
     * @param Constraint $constraint The constraint for the validation
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function validate($domainName, Constraint $constraint): void
    {
        if (null === $domainName) {
            return;
        }
        if (
            false === filter_var($domainName, FILTER_VALIDATE_DOMAIN)
            || false === \ts\stringContains($domainName, '.')
            || false !== \ts\stringContains($domainName, '//')
        ) {
            $this->context->buildViolation(sprintf(DomainName::MESSAGE, $this->formatValue($domainName)))
                          ->setParameter('{{ value }}', $this->formatValue($domainName))
                          ->setCode(DomainName::INVALID_DOMAIN_ERROR)
                          ->addViolation();
        }
    }
}


text:
number: 301
date: 2021-03-18 9:45:00

title: "What No One Explains About the Design Process"
authors: "Jordan Bowman"
tags:
- Design
- Process

site: "UX Tools"
address: "https://uxtools.co/blog/what-no-one-explains-about-the-design-process/"
---

Instead of thinking of design as a procedure, think of it as a toolbox. For different projects, you need different tools. If you're asked to pound in a nail, grabbing a screwdriver isn't ideal.


text:
package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import util.UtilityClass;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: rupeshd
 * Date: 2/11/11
 * Time: 5:30 PM
 * To change this template use File | Settings | File Templates.
 */
public class SearchPage extends DefaultPage{

    WebElement inputMotechID;
    WebElement buttonSubmit;
    WebElement matchTable;
    WebElement inputLastName;
    WebElement inputFirstName;
    UtilityClass utilityClass;

    public SearchPage(){
        utilityClass = new UtilityClass();
    }

    private void initializeDefaultObjects(){
        inputMotechID = driver.findElement(By.id("motechId"));
        buttonSubmit =driver.findElement(By.xpath("//input[@type='submit']"));
        inputLastName = driver.findElement(By.id("lastName"));
        inputFirstName = driver.findElement(By.id("firstName"));
    }

    public boolean searchClientByID(String motechID,String lastName){
        initializeDefaultObjects();
        inputMotechID.sendKeys(motechID);
        buttonSubmit.click();
        utilityClass.wait(1000);
        matchTable = driver.findElement(By.xpath("//div[@id='content']/div[3]/table"));
        List<WebElement> tdList= matchTable.findElements(By.tagName("td"));
        for( WebElement td:tdList){
           if (td.getText().trim().equals(lastName)){
               return true;
           }
        }
        return false;
    }

    //TEMP Function to be deleted
    public boolean searchClientByID(String motechID){
        initializeDefaultObjects();
        inputMotechID.sendKeys(motechID);
        buttonSubmit.click();
        utilityClass.wait(1000);
       matchTable = driver.findElement(By.xpath("//div[@id='content']/div[3]/table"));
        List<WebElement> tdList= matchTable.findElements(By.tagName("td"));
        for( WebElement td:tdList){
           if (td.getText().trim().equals(motechID)){
               return true;
           }
        }
        return false;
    }

    public boolean searchClientByFirstName(String firstName){
        initializeDefaultObjects();
        inputFirstName.sendKeys(firstName);
        buttonSubmit.click();
        utilityClass.wait(1000);
        matchTable = driver.findElement(By.xpath("//div[@id='content']/div[3]/table"));
        List<WebElement> tdList= matchTable.findElements(By.tagName("td"));
        for( WebElement td:tdList){
           if (td.getText().trim().equals(firstName)){
               return true;
           }
        }
        return false;

    }

    public String returnClientIdBySearchingUsingFirstName(String firstName){
        initializeDefaultObjects();
        inputFirstName.sendKeys(firstName);
        buttonSubmit.click();
        utilityClass.wait(1000);
        matchTable = driver.findElement(By.xpath("//div[@id='content']/div[3]/table"));
        List<WebElement> tdList= matchTable.findElements(By.tagName("td"));
        for(WebElement td:tdList){
            if (td.getText().trim().equals(firstName)){
                String MoTeCHid = driver.findElement(By.xpath("//div[@id='content']/div[3]/table/tbody/tr/td[1]")).getText();
                return MoTeCHid;
            }
        }
        return  null;
    }
}


text:
package aries.codegen;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import aries.generation.engine.GenerationContext;

public abstract class AbstractBuilder implements Builder {

	public static String NL = System.getProperty("line.separator");

	public static String SEP = System.getProperty("file.separator");

	protected Log log = LogFactory.getLog(getClass());

	protected GenerationContext context;

	public AbstractBuilder() {
		//do nothing
	}

	public AbstractBuilder(GenerationContext context) {
		setContext(context);
	}

	public GenerationContext getContext() {
		return context;
	}

	public void setContext(GenerationContext context) {
		this.context = context;
	}

}


text:
package javax.crypto.spec;

import java.security.spec.KeySpec;
import java.util.Arrays;

/**
 * The key specification for a password based encryption key.
 *

 * Password based encryption is described in PKCS #5.
 */
public class PBEKeySpec implements KeySpec {

    private char[] password;
    private final byte[] salt;
    private final int iterationCount;
    private final int keyLength;

    /**
     * Creates a new PBEKeySpec with the specified password.
     *
     * @param password
     *            the password.
     */
    public PBEKeySpec(char[] password) {
        if (password == null) {
            this.password = new char[0];
        } else {
            this.password = new char[password.length];
            System.arraycopy(password, 0, this.password, 0, password.length);
        }
        salt = null;
        iterationCount = 0;
        keyLength = 0;
    }

    /**
     * Creates a new PBEKeySpec with the specified password, salt,
     * iteration count and the desired length of the derived key.
     *
     * @param password
     *            the password.
     * @param salt
     *            the salt.
     * @param iterationCount
     *            the iteration count.
     * @param keyLength
     *            the desired key length of the derived key,
     * @throws NullPointerException
     *             if the salt is null.
     * @throws IllegalArgumentException
     *             if the salt is empty, iteration count is zero or negative or
     *             the key length is zero or negative.
     */
    public PBEKeySpec(char[] password, byte[] salt, int iterationCount,
                      int keyLength) {
        if (salt == null) {
            throw new NullPointerException("salt == null");
        }
        if (salt.length == 0) {
            throw new IllegalArgumentException("salt.length == 0");
        }
        if (iterationCount <= 0) {
            throw new IllegalArgumentException("iterationCount <= 0");
        }
        if (keyLength <= 0) {
            throw new IllegalArgumentException("keyLength <= 0");
        }

        if (password == null) {
            this.password = new char[0];
        } else {
            this.password = new char[password.length];
            System.arraycopy(password, 0, this.password, 0, password.length);
        }
        this.salt = new byte[salt.length];
        System.arraycopy(salt, 0, this.salt, 0, salt.length);
        this.iterationCount = iterationCount;
        this.keyLength = keyLength;
    }

    /**
     * Creates a new PBEKeySpec with the specified password, salt
     * and iteration count.
     *
     * @param password
     *            the password.
     * @param salt
     *            the salt.
     * @param iterationCount
     *            the iteration count.
     * @throws NullPointerException
     *             if salt is null.
     * @throws IllegalArgumentException
     *             if the salt is empty or iteration count is zero or negative.
     */
    public PBEKeySpec(char[] password, byte[] salt, int iterationCount) {
        if (salt == null) {
            throw new NullPointerException("salt == null");
        }
        if (salt.length == 0) {
            throw new IllegalArgumentException("salt.length == 0");
        }
        if (iterationCount <= 0) {
            throw new IllegalArgumentException("iterationCount <= 0");
        }

        if (password == null) {
            this.password = new char[0];
        } else {
            this.password = new char[password.length];
            System.arraycopy(password, 0, this.password, 0, password.length);
        }
        this.salt = new byte[salt.length];
        System.arraycopy(salt, 0, this.salt, 0, salt.length);
        this.iterationCount = iterationCount;
        this.keyLength = 0;
    }

    /**
     * Clears the password by overwriting it.
     */
    public final void clearPassword() {
        Arrays.fill(password, '?');
        password = null;
    }

    /**
     * Returns a copy of the password of this key specification.
     *
     * @return a copy of the password of this key specification.
     * @throws IllegalStateException
     *             if the password has been cleared before.
     */
    public final char[] getPassword() {
        if (password == null) {
            throw new IllegalStateException("The password has been cleared");
        }
        char[] result = new char[password.length];
        System.arraycopy(password, 0, result, 0, password.length);
        return result;
    }

    /**
     * Returns a copy of the salt of this key specification.
     *
     * @return a copy of the salt of this key specification or null if none is
     *         specified.
     */
    public final byte[] getSalt() {
        if (salt == null) {
            return null;
        }
        byte[] result = new byte[salt.length];
        System.arraycopy(salt, 0, result, 0, salt.length);
        return result;
    }

    /**
     * Returns the iteration count of this key specification.
     *
     * @return the iteration count of this key specification.
     */
    public final int getIterationCount() {
        return iterationCount;
    }

    /**
     * Returns the desired key length of the derived key.
     *
     * @return the desired key length of the derived key.
     */
    public final int getKeyLength() {
        return keyLength;
    }
}


text:
{-# LANGUAGE RecordWildCards #-}

module Pos.DB.Ssc.SecretStorage
       ( getOurCommitment
       , getOurOpening
       , putOurSecret
       ) where

import           Universum

import           Pos.Chain.Ssc (Opening, SignedCommitment,
                     SscSecretStorage (..))
import           Pos.Core (EpochIndex)
import           Pos.DB (MonadDB, MonadDBRead)
import           Pos.DB.Misc.Common (miscGetBi, miscPutBi)

-- | Get our commitment for given epoch if it's known.
getOurCommitment
    :: MonadDBRead m
    => EpochIndex -> m (Maybe SignedCommitment)
getOurCommitment epoch =
    getSecretStorage <&> \case
        Nothing -> Nothing
        Just SscSecretStorage {..}
            | sssEpoch == epoch -> Just sssCommitment
            | otherwise -> Nothing

-- | Get our opening corresponding for given epoch if it's known.
getOurOpening
    :: MonadDBRead m
    => EpochIndex -> m (Maybe Opening)
getOurOpening epoch =
    getSecretStorage <&> \case
        Nothing -> Nothing
        Just SscSecretStorage {..}
            | sssEpoch == epoch -> Just sssOpening
            | otherwise -> Nothing

-- [FIXME] This function doesn't care about concurrency! It should be atomic.
-- Old code didn't care too, btw.
-- | Put our secret for given epoch.
putOurSecret
    :: MonadDB m
    => SignedCommitment -> Opening -> EpochIndex -> m ()
putOurSecret comm open epoch =
    putSecretStorage $
    SscSecretStorage {sssCommitment = comm, sssOpening = open, sssEpoch = epoch}

----------------------------------------------------------------------------
-- DB
----------------------------------------------------------------------------

getSecretStorage :: MonadDBRead m => m (Maybe SscSecretStorage)
getSecretStorage = miscGetBi secretStorageKey

putSecretStorage :: MonadDB m => SscSecretStorage -> m ()
putSecretStorage = miscPutBi secretStorageKey

secretStorageKey :: ByteString
secretStorageKey = "gtSecretStorageKey"


text:
class EffectWindow : public EngineWindow {
public:
    EffectWindow(
              EffectApp* papp,
        const ZString&   strCommandLine,
		const LPCSTR&   strTitle = "",
              bool       bStartFullscreen = false,
        const WinRect&   rect             = WinRect(0, 0, -1, -1),
        const WinPoint&  sizeMin          = WinPoint(1, 1),
              HMENU      hmenu            = NULL
    );
};

#endif


text:
# lpad [![Build Status](https://secure.travis-ci.org/sindresorhus/lpad.png?branch=master)](http://travis-ci.org/sindresorhus/lpad)

Left pad each line in a string or stdout/stderr.

The stdout/stderr padding is especially useful in CLI tools when you don't directly control the output.

![screenshot](screenshot.png)

## Getting started

Install: `npm install lpad`

## Documentation

### lpad(string, pad)

Pads each line in a string with the supplied pad string.

#### Example

```js
var lpad = require('lpad');
var str = 'foo\nbar';

console.log(str);
/*
foo
bar
*/

console.log(lpad(str, '    '));
/*
    foo
    bar
*/
```

### lpad.stdout(pad)

Pads each line of `process.stdout` with the supplied pad string until the method is called again with no arguments.

#### Example

```js
var lpad = require('lpad');
var str = 'foo\nbar';

lpad.stdout('    ');  // start padding

console.log(str);
/*
    foo
    bar
*/

lpad.stdout();  // end padding

console.log(str);
/*
foo
bar
*/
```

### lpad.stderr(pad)

Pads each line of `process.stderr` with the supplied pad string until the method is called again with no arguments.

## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)
(c) [Sindre Sorhus](http://sindresorhus.com)


text:
<!--
   This file is part of the X12Parser library that provides tools to
   manipulate X12 messages using Ruby native syntax.

   http://x12parser.rubyforge.org

   Copyright (C) 2009 APP Design, Inc.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

   $Id: CL1.xml 78 2009-05-12 22:27:26Z ikk $
-->

<Segment name="CL1" comment="To supply information specific to hospital claims">
  <Field name="AdmissionTypeCode" required="y" min="1" max="1" comment="Code indicating the priority of this admission"/>
  <Field name="AdmissionSourceCode" required="y" min="1" max="1" comment="Code indicating the source of this admission"/>
  <Field name="PatientStatusCode" required="y" min="1" max="2" comment="Code indicating patient status as of the "statement covers through date""/>
  <Field name="NursingHomeResidentialStatusCode" required="y" min="1" max="1" validation="T1345" comment="Code specifying the status of a nursing home resident at the time of service"/>
</Segment>


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

    <TableLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_marginTop="5dip" >

        <TableRow android:layout_marginTop="5dip" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_marginLeft="20dip"
                android:text="@string/name"
                android:textColor="#000000"
                android:textSize="@dimen/text_size_medium" >
            </TextView>

            <TextView
                android:id="@+id/tv_callee_name"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:layout_marginRight="20dip"
                android:layout_weight="1"
                android:textColor="@color/blue"
                android:textSize="@dimen/text_size_medium" >
            </TextView>
        </TableRow>

        <TableRow android:layout_marginTop="10dip" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:text="@string/who"
                android:textColor="#000000"
                android:textSize="@dimen/text_size_medium" >
            </TextView>

            <TextView
                android:id="@+id/tv_callee_who"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:layout_marginRight="20dip"
                android:layout_weight="1"
                android:textColor="@color/blue"
                android:textSize="@dimen/text_size_medium" >
            </TextView>
        </TableRow>

        <TableRow android:layout_marginTop="10dip" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:text="@string/phone1"
                android:textColor="#000000"
                android:textSize="@dimen/text_size_medium" >
            </TextView>

            <TextView
                android:id="@+id/tv_callee_phone1"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:layout_marginRight="20dip"
                android:layout_weight="1"
                android:clickable="true"
                android:textColor="@color/blue"
                android:textSize="@dimen/text_size_medium" >
            </TextView>
        </TableRow>

        <TableRow
            android:layout_marginBottom="10dp"
            android:layout_marginTop="10dip" >

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:text="@string/phone2"
                android:textColor="#000000"
                android:textSize="@dimen/text_size_medium" >
            </TextView>

            <TextView
                android:id="@+id/tv_callee_phone2"
                android:layout_height="wrap_content"
                android:layout_marginLeft="20dip"
                android:layout_marginRight="20dip"
                android:layout_weight="1"
                android:clickable="true"
                android:textColor="@color/blue"
                android:textSize="@dimen/text_size_medium" >
            </TextView>
        </TableRow>
    </TableLayout>

</LinearLayout>


text:
/* global Log4js */

/**
 * Metatag Appender writing the logs to meta tags
 *
 * @extends Log4js.Appender
 * @constructor
 * @author Stephan Strittmatter
 */
Log4js.MetatagAppender = function () {
    this.currentLine = 0;
};
Log4js.MetatagAppender.prototype = Log4js.extend(new Log4js.Appender(), /** @lends Log4js.MetatagAppender# */ {
    /**
     * @param loggingEvent event to be logged
     * @see Log4js.Appender#doAppend
     */
    doAppend: function (loggingEvent) {
        var now = new Date();
        var lines = loggingEvent.message.split("\n");
        var headTag = document.getElementsByTagName("head")[0];

        for (var i = 1; i <= lines.length; i++) {
            var value = lines[i - 1];
            if (i === 1) {
                value = loggingEvent.level.toString() + ": " + value;
            } else {
                value = "> " + value;
            }

            var metaTag = document.createElement("meta");
            metaTag.setAttribute("name", "X-log4js:" + this.currentLine);
            metaTag.setAttribute("content", value);
            headTag.appendChild(metaTag);
            this.currentLine += 1;
        }
    },
    /**
     * toString
     */
    toString: function () {
        return "Log4js.MetatagAppender";
    }
});


text:
namespace Server.Game.Network.Packets
{
    /// <summary>
    ///     This is a master listing of all possible attributes that can be associated with any given
    ///
    ///     If you want to add an attribute, you simply need to add it to this enumeration.
    /// </summary>
    public enum AttributeName
    {
        Amount,

        Movable,

        Hitpoints,
        HitpointsMax,

        Intelligence,
        Vitality,
        Dexterity,
        Strength,
        ExperienceNeeded,
        Level,
        Experience,
        Gold
    }
}


text:
namespace mojo {

SurfacesServiceApplication::SurfacesServiceApplication()
    : next_id_namespace_(1u), display_(NULL) {
}

SurfacesServiceApplication::~SurfacesServiceApplication() {
}

bool SurfacesServiceApplication::ConfigureIncomingConnection(
    ApplicationConnection* connection) {
  connection->AddService(this);
  return true;
}

void SurfacesServiceApplication::Create(ApplicationConnection* connection,
                                        InterfaceRequest<Surface> request) {
  BindToRequest(new SurfacesImpl(&manager_, next_id_namespace_++, this),
                &request);
}

void SurfacesServiceApplication::FrameSubmitted() {
  if (display_)
    display_->Draw();
}

void SurfacesServiceApplication::SetDisplay(cc::Display* display) {
  display_ = display;
}

}  // namespace mojo

MojoResult MojoMain(MojoHandle shell_handle) {
  mojo::ApplicationRunnerChromium runner(new mojo::SurfacesServiceApplication);
  return runner.Run(shell_handle);
}


text:
"""
extracting from C++ doxygen documented file
Author G.D.

Updates for Ogre handling by AJM - added remarks/note/par
jan 03 06 - fix bug, replace single leading \ with \\ in clear_str
"""

# Taken verbatim from python ogre project

class doc_extractor:
    """
    extracts doxigen styled documentation from source
    or generates from description
    """
    def __init__(self, startswith="", outfile="documentation.dox"):
        #for caching source
        self.file_name  = None
        self.source = None
        self.startswith = startswith
#         self.outfile = open ( outfile, 'w' ) # create the file for writing (truncates existing)

    def __call__(self, declaration):
# # #         if not self.startswith in declaration.decl_string:
# #         if not declaration.demangled.startswith(self.startswith):
# #             print "DOC: not in scope", declaration.decl_string
# #             print "name:", declaration.name
# #             print "demangled:", declaration.demangled
# # #             print "type:", declaration.type
# # #             if "Ogre" in declaration.decl_string : sys.exit()
# #             return ""
        try:    # some types such as the base namespace don't have 'location'
            if self.file_name != declaration.location.file_name:
                self.file_name = declaration.location.file_name
                self.source = open(declaration.location.file_name).readlines()
        except:
            print "DOC without location:", declaration
            return ""

        find_block_end = False
        failed = 0
        doc_lines = []
        if declaration.documentation:
            if len(declaration.documentation) > 2:
               # remove any exisiting quotes and and a new line
               basedoc = declaration.documentation.strip('"') + "\\\n"
        else:
            basedoc = ""
#         print declaration
#         print "BASEDOC", basedoc
        ## note the gccxml uses a 1 based line scheme whereas we are using python arrays - 0 based
        ## so we need to subtract 1 from the line number.

        ## then we need to subtract another 1 to put us on the line above the function/class etc defination

        ## AND to make it worse, Ogre coding style often has the opening brace on the line AFTER the defination name
        ## and gccxml gives us the line number with the brace - so we need to look back even further

        ## lets look for a single comment '///'  We'll try upto 2 lines above
        try:
            for lcount in xrange(declaration.location.line-1, declaration.location.line-4 , -1):
                line = self.source[lcount]
                if line.lstrip()[:3] == '///':
                    str_ = clear_str(line)
                    if basedoc:
                        retvalue = '"' + basedoc +  str_[:-2] + '"' # remove the \n from the single line comment
                    else:
                        retvalue = '"' + str_[:-2] + '"' # remove the \n from the single line comment
#                     print "Extracted Doc String (short) ", retvalue

                    return retvalue

            ## if that didn't work we'll look for a block of comments

            for lcount in xrange(declaration.location.line - 1, -1, -1):
                line = self.source[lcount]
                #print "Checking ", lcount, line
                if not find_block_end:
                    try:
                        if line.rstrip()[-2:] == "*/":
                            find_block_end = True
                    except:
                        pass
                if  find_block_end:
                    try:
                        if line.lstrip()[:2] == "/*":
                            find_block_end = False
                    except:
                        pass
                final_str = clear_str(line)
                if not find_block_end and code(line):
                    ## note that ogre code tends to have the opening function/class bracket on the 'next' line
                    ## from the 'name' -so we may need to backup one more line to fine doc string..
                    failed +=1
                    final_str = ""  ## make sure we don't add the extra code line
                    if failed > 2:
                        break
                if final_str:
                    doc_lines.insert(0, clear_str(final_str))
        except:
            if not basedoc:
                return ""
        ret =""
        if doc_lines:
            doc_lines = removeBlankLines ( doc_lines )
            doc_lines = removeLeadingSpace ( doc_lines )
            doc_lines = wrapLines ( doc_lines )
#             print "Extracted Doc String for:",  declaration, "[", len(doc_lines),"]"
            ## we need to cope with strings longer than 2048 for MSVC
            ret =  "\\\n".join(doc_lines)
            if len ( ret ) > 1700:  ## just to be safe and adjust for line end chars etc..
                ret = ""
                length = 1
                for line in doc_lines:
                    ret = ret + line
                    length += len ( line )
                    if length < 1500 :  # again lets be conservative
                        ret = ret + "\\\n"
                    else :
                        ret = ret + '"' + "\n" + '"'    # we close the original 'quote', move to a new line and open a new quote
                        length = 1
        ## Py++ doesn't like non ascii characters in the doc string
        ## class_declaration.py - _generate_constructor - return ( ''.join( result ), used_init )
        newret = ""
#         print "DOC:  GOT SOMETHING", ret
        for c in ret:
            if ord(c) >127:
                c = ' '
            newret = newret + c
        if len(basedoc) >1 or len(newret)>1:
# #             self.outfile.write("***============================*****\n" + declaration.decl_string + "\n")
# #             self.outfile.write( str(len(basedoc)) + "  " + str(len(newret)) + "\n" )
# #             self.outfile.write( newret )
            retval ='"' + basedoc + newret.lstrip() + '"'
#             print "RETURNING:", retval
            return retval
        else:
            return ""

#===============================================================
def removeBlankLines ( docin ):
    """
    remove leading and trailing blank lines
    """
    # first remove leading blank lines
    x = 0
    while x <  len ( docin ) - 1 :
        if docin[x].strip() == "\\n" or docin[x].strip() == '':
            del docin[x]
            x = x - 1
        else:
            break
        x += 1

    # now from the bottom up
    x = len ( docin ) -1
    while x >= 0:
        if docin[x].strip() == "\\n":
            del docin[x]
        else:
            break
        x = len ( docin )- 1

    return docin

#===============================================================
def removeLeadingSpace ( docin ):
    """
    remove leading spaces/tabs to bring minimize space usage
    """
    import string as string
    c = 0
    for x in range ( len (docin) ):
        docin[x] = docin[x].expandtabs(3) # replace tab characters with 3 spaces

    remove = -1  # use to track number of leading spaces to remove. -1 indicates first time through
    for x in range ( len (docin) ):
        c = 0
        for y in range ( len ( docin[x]) ): # now lets count any leading spaces
            if docin[x][y] in string.whitespace:
                c +=1
            else:
                break
        if c > 0:   # Ok so we found leading space
            if remove < 0: # must be first time through
                remove = c
            else:
                if c < remove:  # ensure we get the lowest common value
                    remove = c
        else:   # Ok we found a line without any leading spaces so it's all off
            remove = -1
            break
    if remove > 0: # lets do it again and remove a set of leading spaces
        for x in range ( len (docin) ):
            docin[x] = docin[x][remove:]
    return docin

#===============================================================
def wrapLines ( docin, maxlen = 100 ):
    """
    Break line length to a max while retaining the leading spaces...
    """
    import textwrap as textwrap
    import string
    docout = []
    for line in docin:
        prefix=0
        for c in line:
            if c in string.whitespace:
                prefix += 1
            else:
                break
        for l in textwrap.wrap( line, maxlen ):
            line = ' '*prefix + l.lstrip()
            docout.append ( line )
    return docout

def code(str):
    """
    detect str is code?
    """
    try:
        beg = str.lstrip()[:2]
        return  beg != "//" and beg != "/*"
    except:
        pass
    return False

def clear_str(_str):
    """
    replace */! by Space and \breaf, \fn, \param, ...
    """
    def clean ( _str, sym, change2 = ""):
        return _str.replace(sym, change2)

    _str = clean(_str, "::", ".")     ## make it more python accurate
    _str = clean(_str, "->", ".")
#     _str = clean(_str, "@param", "Param: ")
    _str = clean(_str, "\\param", "@param")
    _str = clean(_str, "@ingroup", "@group")
    _str = clean(_str, "\\ingroup", "@group")
#     _str = clean(_str, "@return", "It return")
    _str = clean(_str, "\\return", "@return")
    _str = clean(_str, "\\Return", "@return")
#     _str = clean(_str, "@note", "Note: ")
    _str = clean(_str, "@remarks", "@see")
    _str = clean(_str, "\\remarks", "@see")
    _str = clean(_str, "\\Remarks", "@see")
#     _str = clean(_str, "@see", "See: ")
    _str = clean(_str, "\\see", "@see")
    _str = clean(_str, "@ref", "@see")
    _str = clean(_str, "\\ref", "@see")
    _str = clean(_str, "@copydoc", "Ref: ")
    _str = clean(_str, "\\verbatim", "" )
    _str = clean(_str, "\\endverbatim", "" )

    _str = clean(_str, "\\sa", "@see")   # comment _string in OgreNewt
    _str = clean(_str, "\\codeblock", "::")
    _str = clean(_str, "\\code", "::")
    _str = clean(_str, "\\endcode", "\\n")
    _str = clean(_str, "@codeblock", "\\n")   # endsure a new line to end the code block
    _str = clean(_str, "@code", "::")   # using literal code blocks

#     _str = clean(_str, "@par", "")    ## it will get a single blank line by default -- breaks @param...
    _str = clean(_str, "\r\n", "\\n")   ## for linux build
    _str = clean(_str, "\\par", "")    ## it will get a single blank line by default
    _str = clean(_str, "\n", "\\n")
    _str = clean(_str, "\\p", "")     ## cegui comments
    _str = clean(_str, "\\li", "  * ")     ## ode comments
    _str = clean(_str, "\\exception", "@exception")
    _str = clean(_str, "\\a", "")     ## cegui

    _str = clean(_str, "\\warning", "@Warning: ")     ## nxPhysics
    _str = clean(_str, "\\include", "Include: ")     ## nxPhysics
    _str = clean(_str, "\\image", "Image: ")     ## nxPhysics

    _str = clean(_str, "\\examples", "Examples: ")     ## nxOgre
    _str = clean(_str, "\\default", "Default: ")     ## nxOgre

    _str = clean(_str, "\\version", "@version ")     ## cegui
    _str = clean(_str, "\\date", "@date ")     #
    _str = clean(_str, "\\todo", "@todo ")     ##
    _str = clean(_str, "\\bug", "@Bug ")     ##
    _str = clean(_str, "\\author", "@Author ")     ##

    ## now clean up the rest
    _str = reduce(clean, [_str, '/', "\\brief", '\\fn',
         "@brief", "@fn", '"', "@{", "\\c", "\\a"]) ## somtimes there are '"' in the doc strings and other "\\"...
#     return _str.lstrip()
#     return "  " + _str.lstrip()

    # another fix to remove stray escape sequences - only new lines allowed
    # last character should never be a backslash, however lets fix it just in case...
    # and we need to make a new copy because strings are immutable...
    newStr=""
    for x in range ( len ( _str) -1  ): # handle upto 2nd to last character
        if _str[x] == '\\' and _str[x+1] != 'n':
# #             print "fixing stray escape sequence", x, _str
            newStr += ' '
        else:
            newStr += _str[x]
    x = len (_str) -1 # need to handle last character
    if _str[x] == '\\' :
# #         print "fixing stray escape sequence EOL", _str
        newStr += ' '
    else:
        newStr += _str[x]
    return newStr  ## no removale of white space so Epytext can handle sections etc

def make_epytext ( str ):
    """ turn this string into something more Epytext compatible """
    knownfields = ['param']

if __name__ == '__main__':
    class loc:
        def __init__(self, f, l):
            self.file_name = f
            self.line = l

    class x_decl:
        def __init__(self, str, file_name, line):
            self.str  = str
            self.location = loc(file_name, line)
            self.decl_string = ""

        def __str__(self):
            return self.str

    print doc_extractor("")(x_decl("myfunc(int x, int y)","c:/development/ocvs/ogrenew/ogremain/include/OgreSceneManager.h",218))
    print doc_extractor("")(x_decl("","c:/development/ocvs/ogrenew/ogremain/include/OgreSceneManager.h",223))

    print doc_extractor("")(x_decl("","c:/development/CEGUI-0.5.0/include/CEGUIEvent.h",139))


text:
#ifndef _BSD_COMPAT_H
#define _BSD_COMPAT_H

#include "pkg_config.h"

#ifdef __OpenBSD__
 #include "../external/libelf/_elftc.h"

 #ifndef EPROTO
  #define EPROTO EINTR
 #endif
#endif

#ifdef HAVE_BSD_SYS_CDEFS_H
#include <bsd/sys/cdefs.h>
#endif

#ifdef HAVE_BSD_STDLIB_H
#include <bsd/stdlib.h>
#endif

#ifdef HAVE_BSD_UNISTD_H
#include <bsd/unistd.h>
#endif

#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
#endif

#ifdef HAVE_BSD_STDIO_H
#include <bsd/stdio.h>
#endif

#ifdef HAVE_BSD_ERR_H
#include <bsd/err.h>
#endif

#ifdef HAVE_BSD_LIBUTIL_H
#include <bsd/libutil.h>
#endif

#include <sys/stat.h>
#include "endian_util.h"

char *bsd_dirname(const char *);
char *bsd_basename(const char *);

#if !HAVE_EACCESS
#define eaccess(_p, _m) access(_p, _m)
#endif

#if !HAVE_HUMANIZE_NUMBER
#include "humanize_number.h"
#endif

#if !HAVE_CLOSEFROM
void closefrom(int lowfd);
#endif

#ifndef AT_FDCWD
#define AT_FDCWD		-100
#endif

#ifndef AT_EACCESS
#define AT_EACCESS		0x100
#endif

#ifndef AT_SYMLINK_NOFOLLOW
#define	AT_SYMLINK_NOFOLLOW	0x200
#endif

#if !HAVE_DECL_FACCESSAT
int faccessat(int fd, const char *path, int mode, int flag);
#endif

#if !HAVE_FSTATAT
int fstatat(int fd, const char *path, struct stat *buf, int flag);
#endif

#if !HAVE_DECL_OPENAT
int openat(int fd, const char *path, int flags, ...);
#endif

#if !HAVE_DECL_READLINKAT
ssize_t readlinkat(int fd, const char *restrict path, char *restrict buf, size_t bufsize);
#endif

#if !HAVE_DECL_UNLINKAT
# ifndef AT_REMOVEDIR
#  define AT_REMOVEDIR	0x800
# endif
int unlinkat(int fd, const char *path, int flag);
#endif

#if !HAVE_STRTONUM
long long strtonum(const char *, long long, long long, const char **);
#endif

#if !HAVE_STRNSTR
char * strnstr(const char *s, const char *find, size_t slen);
#endif

#ifndef _PATH_GROUP
#define _PATH_GROUP "/etc/group"
#endif

#ifndef __FBSDID
#define __FBSDID(x)
#endif

#ifndef EAUTH
#define EAUTH 80
#endif

#ifndef ENEEDAUTH
#define ENEEDAUTH 81
#endif

#ifndef MAXLOGNAME
#define MAXLOGNAME 33
#endif

#ifndef __DECONST
#define __DECONST(type, var)    ((type)(uintptr_t)(const void *)(var))
#endif

#ifndef __unused
#ifdef __GNUC__
# define __unused __attribute__((__unused__))
#else
# define __unused
#endif
#endif

#if !HAVE_FUNOPEN
#if !HAVE_FOPENCOOKIE
# error "Your system has neither funopen nor fopencookie, cannot continue"
#endif
FILE * funopen(const void *cookie, int (*readfn)(void *, char *, int),
         int (*writefn)(void *, const char *, int),
         off_t (*seekfn)(void *, off_t, int), int (*closefn)(void *));
#endif

#endif


text:
@echo off

set MAP=--map-data
set CLIENT="applications|controlm25"
set CONTROLM=%1
set SHOUT_MSG=%2
set IA_HOME=C:\xMatters\integrationagent-5.1.8\bin

VER | TIME > TEMP.BAT
ECHO SET TIME=%%3>CURRENT.BAT
CALL TEMP.BAT
DEL TEMP.BAT
DEL CURRENT.BAT

echo TIME=%TIME% >> %IA_HOME%\ControlmAPClient.log
echo MAP=%MAP% >> %IA_HOME%\ControlmAPClient.log
echo CLIENT=%CLIENT% >> %IA_HOME%\ControlmAPClient.log
echo CONTROLM=%CONTROLM% >> %IA_HOME%\ControlmAPClient.log
echo SHOUT_MSG=%SHOUT_MSG% >> %IA_HOME%\ControlmAPClient.log

set APARGS=%MAP% %CLIENT% %SHOUT_MSG% %CONTROLM%

echo APARGS=%APARGS% >> %IA_HOME%\ControlmAPClient.log

%IA_HOME%\APClient.bin.exe %APARGS%

IF %ERRORLEVEL% NEQ 0 echo An error has occurred trying to dispatch a Control M Job Message to APClient with the following message: %SHOUT_MSG% >> %IA_HOME%\ControlmAPClientErrors.log