text:
.class public Lcom/android/internal/telephony/ConferenceCallXml;
.super Lorg/xml/sax/helpers/DefaultHandler;
.source "ConferenceCallXml.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/android/internal/telephony/ConferenceCallXml$User;
    }
.end annotation

# static fields
.field public static final STATUS_CONNECTED:Ljava/lang/String; = "connected"

.field public static final STATUS_DISCONNECTED:Ljava/lang/String; = "disconnected"

.field public static final STATUS_ON_HOLD:Ljava/lang/String; = "on-hold"

# instance fields
.field private final TAG:Ljava/lang/String;

.field private mCallId:I

.field private mDuringEndPointTag:Z

.field private mIndex:I

.field private mMaxUserCount:I

.field private preTag:Ljava/lang/String;

.field private tempVal:Ljava/lang/String;

.field private user:Lcom/android/internal/telephony/ConferenceCallXml$User;

.field private users:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/telephony/ConferenceCallXml$User;",
            ">;"
        }
    .end annotation
.end field

# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 21
    invoke-direct {p0}, Lorg/xml/sax/helpers/DefaultHandler;-><init>()V

    .line 22
    const-string v0, "ConferenceCallXml"

    iput-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->TAG:Ljava/lang/String;

    .line 28
    const/4 v0, -0x1

    iput v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mCallId:I

    .line 29
    iput-boolean v1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mDuringEndPointTag:Z

    .line 30
    iput v1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mIndex:I

    .line 40
    return-void
.end method

# virtual methods
.method public characters([CII)V
    .locals 1
    .param p1, "ch"    # [C
    .param p2, "start"    # I
    .param p3, "length"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/xml/sax/SAXException;
        }
    .end annotation

    .prologue
    .line 122
    new-instance v0, Ljava/lang/String;

    invoke-direct {v0, p1, p2, p3}, Ljava/lang/String;-><init>([CII)V

    iput-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->tempVal:Ljava/lang/String;

    .line 123
    return-void
.end method

.method public endElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 4
    .param p1, "uri"    # Ljava/lang/String;
    .param p2, "localName"    # Ljava/lang/String;
    .param p3, "qName"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/xml/sax/SAXException;
        }
    .end annotation

    .prologue
    const/4 v3, 0x0

    .line 151
    const-string v0, "user"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    if-eqz v0, :cond_1

    .line 152
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->users:Ljava/util/List;

    iget-object v1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 153
    iput-object v3, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    .line 166
    :cond_0
    :goto_0
    iput-object v3, p0, Lcom/android/internal/telephony/ConferenceCallXml;->preTag:Ljava/lang/String;

    .line 167
    return-void

    .line 154
    :cond_1
    const-string v0, "endpoint"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    if-eqz v0, :cond_2

    .line 155
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mDuringEndPointTag:Z

    goto :goto_0

    .line 156
    :cond_2
    const-string v0, "display-text"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    if-eqz v0, :cond_3

    iget-boolean v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mDuringEndPointTag:Z

    if-nez v0, :cond_3

    .line 157
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    iget-object v1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->tempVal:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/android/internal/telephony/ConferenceCallXml$User;->setDisplayText(Ljava/lang/String;)V

    .line 158
    const-string v0, "ConferenceCallXml"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "user - DisplayText: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    invoke-virtual {v2}, Lcom/android/internal/telephony/ConferenceCallXml$User;->getDisplayText()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 159
    :cond_3
    const-string v0, "maximum-user-count"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_4

    .line 160
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->tempVal:Ljava/lang/String;

    invoke-virtual {p0, v0}, Lcom/android/internal/telephony/ConferenceCallXml;->setMaxUserCount(Ljava/lang/String;)V

    .line 161
    const-string v0, "ConferenceCallXml"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "MaxUserCount: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p0}, Lcom/android/internal/telephony/ConferenceCallXml;->getMaxUserCount()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0

    .line 162
    :cond_4
    const-string v0, "status"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    if-eqz v0, :cond_0

    .line 163
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    iget-object v1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->tempVal:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/android/internal/telephony/ConferenceCallXml$User;->setStatus(Ljava/lang/String;)V

    .line 164
    const-string v0, "ConferenceCallXml"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Status: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    invoke-virtual {v2}, Lcom/android/internal/telephony/ConferenceCallXml$User;->getStatus()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto/16 :goto_0
.end method

.method public getCallId()I
    .locals 1

    .prologue
    .line 105
    iget v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mCallId:I

    return v0
.end method

.method public getMaxUserCount()I
    .locals 1

    .prologue
    .line 97
    iget v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mMaxUserCount:I

    return v0
.end method

.method public getUsers()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Lcom/android/internal/telephony/ConferenceCallXml$User;",
            ">;"
        }
    .end annotation

    .prologue
    .line 89
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->users:Ljava/util/List;

    return-object v0
.end method

.method public setCallId(I)V
    .locals 0
    .param p1, "callId"    # I

    .prologue
    .line 101
    iput p1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mCallId:I

    .line 102
    return-void
.end method

.method setMaxUserCount(Ljava/lang/String;)V
    .locals 1
    .param p1, "maxUserCount"    # Ljava/lang/String;

    .prologue
    .line 93
    invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    iput v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mMaxUserCount:I

    .line 94
    return-void
.end method

.method public startDocument()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/xml/sax/SAXException;
        }
    .end annotation

    .prologue
    .line 113
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->users:Ljava/util/List;

    .line 114
    return-void
.end method

.method public startElement(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lorg/xml/sax/Attributes;)V
    .locals 3
    .param p1, "uri"    # Ljava/lang/String;
    .param p2, "localName"    # Ljava/lang/String;
    .param p3, "qName"    # Ljava/lang/String;
    .param p4, "attributes"    # Lorg/xml/sax/Attributes;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/xml/sax/SAXException;
        }
    .end annotation

    .prologue
    .line 131
    const-string v0, "user"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 132
    iget v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mIndex:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mIndex:I

    .line 133
    new-instance v0, Lcom/android/internal/telephony/ConferenceCallXml$User;

    invoke-direct {v0, p0}, Lcom/android/internal/telephony/ConferenceCallXml$User;-><init>(Lcom/android/internal/telephony/ConferenceCallXml;)V

    iput-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    .line 134
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    iget v1, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mIndex:I

    invoke-virtual {v0, v1}, Lcom/android/internal/telephony/ConferenceCallXml$User;->setIndex(I)V

    .line 135
    iget-object v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    const-string v1, ""

    const-string v2, "entity"

    invoke-interface {p4, v1, v2}, Lorg/xml/sax/Attributes;->getValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/android/internal/telephony/ConferenceCallXml$User;->setEntity(Ljava/lang/String;)V

    .line 136
    const-string v0, "ConferenceCallXml"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "user - entity: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    invoke-virtual {v2}, Lcom/android/internal/telephony/ConferenceCallXml$User;->getEntity()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 142
    :cond_0
    :goto_0
    iput-object p2, p0, Lcom/android/internal/telephony/ConferenceCallXml;->preTag:Ljava/lang/String;

    .line 143
    return-void

    .line 137
    :cond_1
    const-string v0, "endpoint"

    invoke-virtual {p3, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 139
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/android/internal/telephony/ConferenceCallXml;->mDuringEndPointTag:Z

    .line 140
    const-string v0, "ConferenceCallXml"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "endpoint - entity: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/android/internal/telephony/ConferenceCallXml;->user:Lcom/android/internal/telephony/ConferenceCallXml$User;

    invoke-virtual {v2}, Lcom/android/internal/telephony/ConferenceCallXml$User;->getEntity()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method


text:
package com.jlj.vo;

public class CommontimeVO {

	private int cid;
	private String commontimename;

	public int getCid() {
		return cid;
	}
	public void setCid(int cid) {
		this.cid = cid;
	}
	public String getCommontimename() {
		return commontimename;
	}
	public void setCommontimename(String commontimename) {
		this.commontimename = commontimename;
	}

	public CommontimeVO() {
	}
	public CommontimeVO(int cid, String commontimename) {
		this.cid = cid;
		this.commontimename = commontimename;
	}

}

redpajama_set_name: RedPajamaGithub


text:
import {KernelConfig, KernelFunc, NumericDataType, TensorInfo, TopK, TopKAttrs, TopKInputs, TypedArray, util} from '@tensorflow/tfjs-core';

import {WebGPUBackend} from '../backend_webgpu';
import {topKImplCPU} from '../kernel_utils/shared';
import {MergeProgram, SwapProgram} from '../top_k_webgpu';
import {fill} from './Fill';
import {gatherV2} from './GatherV2';
import {reshape} from './Reshape';
import {slice} from './Slice';

function disposeIntermediateTensorInfoOrNull(
    backend: WebGPUBackend, tensorInfo: TensorInfo) {
  if (tensorInfo !== null) {
    backend.disposeData(tensorInfo.dataId);
  }
}

function roundUpToPow2(num: number) {
  let pow2 = 1;
  while (pow2 < num) {
    pow2 *= 2;
  }
  return pow2;
}

// Based on Algorithm 2 of Bitonic Top K, ref:
// https://anilshanbhag.in/static/papers/gputopk_sigmod18.pdf
export function topK(
    args: {inputs: TopKInputs, backend: WebGPUBackend, attrs: TopKAttrs}):
    TensorInfo[] {
  const {inputs, backend, attrs} = args;
  const {x} = inputs;
  const {k, sorted}= attrs;

  const xShape = x.shape;
  const lastDim = xShape[xShape.length - 1];

  if (backend.shouldExecuteOnCPU([x])) {
    const xVals = backend.readSync(x.dataId) as TypedArray;
    const [allTopKVals, allTopKIndices] =
        topKImplCPU(xVals, xShape, x.dtype as NumericDataType, k, sorted);

    return [
      backend.makeTensorInfo(
          allTopKVals.shape, allTopKVals.dtype, allTopKVals.values),
      backend.makeTensorInfo(
          allTopKIndices.shape, allTopKIndices.dtype, allTopKIndices.values)
    ];
  }

  if (k === 0) {
    xShape[xShape.length - 1] = 0;
    return [
      backend.makeTensorInfo(xShape, x.dtype, []),
      backend.makeTensorInfo(xShape, 'int32', [])
    ];
  }

  if (lastDim === 1 /* firstPass */) {
    return [
      x, fill({attrs: {shape: xShape, dtype: 'int32', value: 0}, backend})
    ];
  }

  // Reshape into a 2d tensor [batch, lastDim] and compute topk along lastDim.
  const xSize = util.sizeFromShape(xShape);
  const batch = xSize / lastDim;
  const x2D = reshape({inputs: {x}, attrs: {shape: [batch, lastDim]}, backend});

  const kPow2 = roundUpToPow2(k);
  const lastDimPow2 = roundUpToPow2(lastDim);

  // Only the indices containing the top K are kept at every step to reduce
  // number of outputs in the GPU algorithms, so once the final set of indices
  // is computed then gather is used to grab the corresponding values
  // from the original input.
  let indices: TensorInfo = null;

  // GPU algorithm always takes in an indices input but this input is not used
  // on the first run of a GPU algorithm, therefore if indices is null we simply
  // pass in x2D instead of it but the value will not actually be used
  const getInputs = () => indices === null ? [x2D, x2D] : [x2D, indices];

  const runSwap = (dir: number, inc: number, shape: number[]) => {
    const inputs = getInputs();
    const program = new SwapProgram(shape);
    const firstPass = indices === null ? 1 : 0;
    const uniformDataSwap = [
        {type: 'int32', data: [lastDim]},
        {type: 'int32', data: [firstPass]},
        {type: 'float32', data: [Number.NEGATIVE_INFINITY]},
        {type: 'int32', data: [dir]},
        {type: 'int32', data: [inc]}
    ];
    const prevIndices = indices;
    indices = backend.runWebGPUProgram(
        program, inputs, 'int32', uniformDataSwap);
    disposeIntermediateTensorInfoOrNull(backend, prevIndices);
  };

  // Step 1: local sort
  for (let len = 1; len < kPow2; len *= 2) {
    const dir = len * 2;
    for (let inc = len; inc >= 1; inc /= 2) {
      runSwap(dir, inc, [batch, lastDimPow2]);
    }
  }

  // Step 2: merge
  for (let indicesSize = lastDimPow2; indicesSize > kPow2; indicesSize /= 2) {
    const inputs = getInputs();
    const mergeProgram = new MergeProgram([batch, indicesSize / 2]);
    const firstPass = indices === null ? 1 : 0;
    const uniformDataMerge = [
        {type: 'int32', data: [lastDim]},
        {type: 'int32', data: [firstPass]},
        {type: 'int32', data: [kPow2]}
    ];
    const prevIndices = indices;
    indices = backend.runWebGPUProgram(
        mergeProgram, inputs, 'int32', uniformDataMerge);
    disposeIntermediateTensorInfoOrNull(backend, prevIndices);

    // Step 3: rebuild
    const len = kPow2 / 2;
    const dir = len * 2;
    for (let inc = len; inc >= 1; inc /= 2) {
      runSwap(dir, inc, indices.shape);
    }
  }

  // Keep only the requested top K results instead of kPow2
  let prevIndices = indices;
  indices = slice(
      {inputs: {x: indices}, backend, attrs: {begin: 0, size: [batch, k]}});
  disposeIntermediateTensorInfoOrNull(backend, prevIndices);

  // Gather values on last dimension
  let values = gatherV2(
      {inputs: {x: x2D, indices}, backend, attrs: {axis: 1, batchDims: 1}});
  disposeIntermediateTensorInfoOrNull(backend, x2D);

  // Reshape back to the original input shape, except that the last
  // dimension is k.
  const newShape = xShape.slice(0, -1);
  newShape.push(k);

  prevIndices = indices;
  indices = reshape({inputs: {x: indices}, attrs: {shape: newShape}, backend});
  disposeIntermediateTensorInfoOrNull(backend, prevIndices);

  const prevValues = values;
  values = reshape({inputs: {x: values}, attrs: {shape: newShape}, backend});
  disposeIntermediateTensorInfoOrNull(backend, prevValues);

  return [values, indices];
}

export const topKConfig: KernelConfig = {
  kernelName: TopK,
  backendName: 'webgpu',
  kernelFunc: topK as {} as KernelFunc
};


text:
<?xml version="1.0" encoding="utf-8" ?>
<manifest>
  <template>ULXSLT.xslt</template>
</manifest>


text:
import * as widgets from '@jupyter-widgets/base';
import * as d3 from 'd3';
// var d3 =Object.assign({}, require("d3-selection"));
const d3GetEvent = function(){return require("d3-selection").event}.bind(this);
import * as interaction from './Interaction';
import * as _ from 'underscore';

export class PanZoom extends interaction.Interaction {

    render() {
        super.render();
        const that = this;
        this.d3el
          .style("cursor", "move")
          .on("mousedown", function() { that.mousedown(); })
          .on("mousemove", function() { that.mousemove(); })
          .on("mouseup", function() { that.mouseup(); })
          .on("mousewheel", function() { that.mousewheel(); })
          .on("DOMMouseScroll.zoom", function() { that.mousewheel(); })
          .on("mousewheel.zoom", null)
          .on("wheel.zoom", null);
        this.active = false;

        this.update_scales();
        this.listenTo(this.model, "change:scales", this.update_scales);

        this.set_ranges();
        this.listenTo(this.parent, "margin_updated", this.set_ranges);
    }

    update_scales() {
        const scales = this.model.get("scales");
        const that = this;
        this.scale_promises = widgets.resolvePromisesDict({
            "x": Promise.all((scales.x || []).map(function(model : widgets.WidgetModel) {
                    return that.create_child_view(model);
                 })),
            "y": Promise.all((scales.y || []).map(function(model : widgets.WidgetModel) {
                    return that.create_child_view(model);
                 })),
        });
        widgets.resolvePromisesDict(this.scale_promises)
            .then(_.bind(this.set_ranges, this));
    }

    set_ranges() {
       const that = this;
       let i;
       this.scale_promises.then(function(scale_views) {
           const xscale_views = scale_views.x;
           for (i=0; i<xscale_views.length; i++) {
               xscale_views[i].set_range(that.parent.padded_range("x",
                                                xscale_views[i].model));
           }
           const yscale_views = scale_views.y;
           for (i=0; i<yscale_views.length; i++) {
               yscale_views[i].set_range(that.parent.padded_range("y",
                                                yscale_views[i].model));
           }
       });
    }

    mousedown() {
        this._mousedown(d3.mouse(this.el));
    }

    _mousedown(mouse_pos) {
        const scales = this.model.get("scales");
        this.active = true;
        this.d3el.style("cursor", "move");
        this.previous_pos = mouse_pos.slice();
        // A copy of the original domains is required to avoid additional
        // drift when Paning.
        this.domains_in_order = {
            "x": (scales.x || []).map(function(s) {
                return s.get_domain_slice_in_order();
            }),
            "y": (scales.y || []).map(function(s) {
                return s.get_domain_slice_in_order();
            }),
        };
    }

    mouseup () {
        this.active = false;
    }

    mousemove() {
        this._mousemove(d3.mouse(this.el));
    }

    _mousemove(mouse_pos) {
        if (this.active && this.model.get("allow_pan")) {
            // If memory is set to true, intermediate positions between the
            // last position of the mouse and the current one will be
            // interpolated.
            if (this.previous_pos === undefined) {
                this.previous_pos = mouse_pos;
            }
            const mouse_delta = {
                x: mouse_pos[0] - this.previous_pos[0],
                y: mouse_pos[1] - this.previous_pos[1],
            }
            return this.scale_promises.then((scale_views) => {
                ["x", "y"].forEach((dimension) => {
                    scale_views[dimension].forEach((view, index) => {
                        if (view.scale.invert) { // Categorical scales don't have an inversion.
                            const scale = view.scale.copy().domain(this.domains_in_order[dimension][index]);
                            // convert the initial domain to pixel coordinates
                            const pixel_min = scale(this.domains_in_order[dimension][index][0]);
                            const pixel_max = scale(this.domains_in_order[dimension][index][1]);
                            // shift pixels, and convert to new domain
                            const domain_min = scale.invert(pixel_min - mouse_delta[dimension]);
                            const domain_max = scale.invert(pixel_max - mouse_delta[dimension]);
                            view.model.set("min", domain_min);
                            view.model.set("max", domain_max);
                            view.touch();
                        }
                    });
                });
            });
        }
    }

    mousewheel() {
        if (this.model.get("allow_zoom")) {
            d3GetEvent().preventDefault();
            // With Firefox, wheelDelta is undefined.
            const delta = d3GetEvent().wheelDelta || d3GetEvent().detail * (-40);
            const mouse_pos = d3.mouse(this.el);
            this._zoom(mouse_pos, delta);
        }
    }

    _zoom(mouse_pos, delta) {
        if (delta) {
            if (delta > 0) {
                this.d3el.style("cursor", "zoom-in");
            } else {
                this.d3el.style("cursor", "zoom-out");
            }
            const mouse = {x: mouse_pos[0], y: mouse_pos[1]};
            const factor = Math.exp(-delta * 0.001);
            return this.scale_promises.then((scale_views) => {
                ["x", "y"].forEach((dimension) => {
                    scale_views[dimension].forEach((view, index) => {
                        if (view.scale.invert) { // Categorical scales don't have an inversion.
                            const scale = view.scale;//.copy().domain(this.domains_in_order[dimension][index]);
                            // convert the initial domain to pixel coordinates
                            let [domain_min, domain_max] = view.model.get_domain_slice_in_order();
                            const pixel_min = scale(domain_min);
                            const pixel_max = scale(domain_max);
                            // take a weighted average between the mouse pos and the original pixel coordinate
                            // and translate that back to the domain
                            domain_min = scale.invert((1 - factor) * mouse[dimension] + factor * pixel_min);
                            domain_max = scale.invert((1 - factor) * mouse[dimension] + factor * pixel_max);
                            view.model.set("min", domain_min);
                            view.model.set("max", domain_max);
                            view.touch();
                        }
                    });
                });
            });
        }
    }

    active: boolean;
    scale_promises: any;
    previous_pos: any;
    domains_in_order: any;
}


text:
package org.motechproject.server.model.db.hibernate;

import org.motechproject.server.model.MessageProgram;
import org.motechproject.server.model.ExpectedCareMessageDetails;

import java.util.List;

public interface MessageProgramDAO {
    List<ExpectedCareMessageDetails> messageDetails();

    MessageProgram weeklyProgram(String programName);
}


text:
package io.github.swagger2markup.internal.resolver;

import io.github.swagger2markup.Swagger2MarkupConverter;

import static io.github.swagger2markup.utils.IOUtils.normalizeName;
import static org.apache.commons.lang3.StringUtils.defaultString;

/**
 * Overrides definition document resolver functor for inter-document cross-references from definitions files.
 * This implementation simplifies the path between two definitions because all definitions are in the same path.
 */
public class DefinitionDocumentResolverFromDefinition extends DefinitionDocumentResolverDefault {

    public DefinitionDocumentResolverFromDefinition(Swagger2MarkupConverter.SwaggerContext context) {
        super(context);
    }

    public String apply(String definitionName) {
        String defaultResolver = super.apply(definitionName);

        if (defaultResolver != null && config.isSeparatedDefinitionsEnabled())
            return defaultString(config.getInterDocumentCrossReferencesPrefix()) + markupDocBuilder.addFileExtension(normalizeName(definitionName));
        else
            return defaultResolver;
    }
}


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 io.trino.plugin.thrift.api;

import io.airlift.drift.annotations.ThriftConstructor;
import io.airlift.drift.annotations.ThriftField;
import io.airlift.drift.annotations.ThriftStruct;
import io.trino.spi.connector.ColumnMetadata;
import io.trino.spi.type.TypeManager;

import javax.annotation.Nullable;

import java.util.Objects;
import java.util.Optional;

import static com.google.common.base.MoreObjects.toStringHelper;
import static io.airlift.drift.annotations.ThriftField.Requiredness.OPTIONAL;
import static io.trino.plugin.thrift.api.NameValidationUtils.checkValidName;
import static java.util.Objects.requireNonNull;

@ThriftStruct
public final class TrinoThriftColumnMetadata
{
    private final String name;
    private final String type;
    private final String comment;
    private final boolean hidden;

    @ThriftConstructor
    public TrinoThriftColumnMetadata(String name, String type, @Nullable String comment, boolean hidden)
    {
        this.name = checkValidName(name);
        this.type = requireNonNull(type, "type is null");
        this.comment = comment;
        this.hidden = hidden;
    }

    @ThriftField(1)
    public String getName()
    {
        return name;
    }

    @ThriftField(2)
    public String getType()
    {
        return type;
    }

    @Nullable
    @ThriftField(value = 3, requiredness = OPTIONAL)
    public String getComment()
    {
        return comment;
    }

    @ThriftField(4)
    public boolean isHidden()
    {
        return hidden;
    }

    public ColumnMetadata toColumnMetadata(TypeManager typeManager)
    {
        return ColumnMetadata.builder()
                .setName(name)
                .setType(typeManager.fromSqlType(type))
                .setComment(Optional.ofNullable(comment))
                .setHidden(hidden)
                .build();
    }

    @Override
    public boolean equals(Object obj)
    {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        TrinoThriftColumnMetadata other = (TrinoThriftColumnMetadata) obj;
        return Objects.equals(this.name, other.name) &&
                Objects.equals(this.type, other.type) &&
                Objects.equals(this.comment, other.comment) &&
                this.hidden == other.hidden;
    }

    @Override
    public int hashCode()
    {
        return Objects.hash(name, type, comment, hidden);
    }

    @Override
    public String toString()
    {
        return toStringHelper(this)
                .add("name", name)
                .add("type", type)
                .add("comment", comment)
                .add("hidden", hidden)
                .toString();
    }
}


text:
<?PHP

require_once('View.php');

class ProductView extends View
{

	function fetch()
	{
//отладка
//        print('product ::
');
//        var_dump($this->cloth->m->getAllTypeMaterial());
//        var_dump($this->cloth->m->getAllPriceBind());
//        var_dump($this->cloth->m->getAllCloth());
//        var_dump($this->cloth->m->getAllCompany());
//        var_dump($this->cloth->m->getAllTKM());
//        var_dump($this->cloth->m->getMP());
//        print('
');
        //взять название компаний и забрать
//        print('
');
//        var_dump($this->cloth);
//        print_r($_SESSION);
//        print_r($_GET);
//        print_r($_POST);
//        print('
');

        $model['getAllTypeMaterial']    = $this->cloth->m->getAllTypeMaterial();
        $model['getAllPriceBind']       = $this->cloth->m->getAllPriceBind();
        $model['getAllTKM']             = $this->cloth->m->getAllTKM();
        $model['getAllCompany']         = $this->cloth->m->getAllCompany();
//        var_dump($this->cloth->v);
//        var_dump($model);
        $this->design->assign('cloth', $this->cloth->v->decoratorPopup($model));
		$product_url = $this->request->get('product_url', 'string');

		if(empty($product_url))
			return false;

		// Выбираем товар из базы
		$product = $this->products->get_product((string)$product_url);
		if(empty($product) || (!$product->visible && empty($_SESSION['admin'])))
			return false;

		$product->images = $this->products->get_images(array('product_id'=>$product->id));
		$product->image = reset($product->images);

		$variants = array();
		foreach($this->variants->get_variants(array('product_id'=>$product->id, 'in_stock'=>true)) as $v)
			$variants[$v->id] = $v;

		$product->variants = $variants;

		// Вариант по умолчанию
		if(($v_id = $this->request->get('variant', 'integer'))>0 && isset($variants[$v_id]))
			$product->variant = $variants[$v_id];
		else
			$product->variant = reset($variants);

		$product->features = $this->features->get_product_options(array('product_id'=>$product->id));

		// Автозаполнение имени для формы комментария
		if(!empty($this->user))
			$this->design->assign('comment_name', $this->user->name);

		// Принимаем комментарий
		if ($this->request->method('post') && $this->request->post('comment'))
		{
			$comment = new stdClass;
			$comment->name = $this->request->post('name');
			$comment->text = $this->request->post('text');
			$captcha_code =  $this->request->post('captcha_code', 'string');

			// Передадим комментарий обратно в шаблон - при ошибке нужно будет заполнить форму
			$this->design->assign('comment_text', $comment->text);
			$this->design->assign('comment_name', $comment->name);

			// Проверяем капчу и заполнение формы
			if ($_SESSION['captcha_code'] != $captcha_code || empty($captcha_code))
			{
				$this->design->assign('error', 'captcha');
			}
			elseif (empty($comment->name))
			{
				$this->design->assign('error', 'empty_name');
			}
			elseif (empty($comment->text))
			{
				$this->design->assign('error', 'empty_comment');
			}
			else
			{
				// Создаем комментарий
				$comment->object_id = $product->id;
				$comment->type      = 'product';
				$comment->ip        = $_SERVER['REMOTE_ADDR'];

				// Если были одобренные комментарии от текущего ip, одобряем сразу
				$this->db->query("SELECT 1 FROM __comments WHERE approved=1 AND ip=? LIMIT 1", $comment->ip);
				if($this->db->num_rows()>0)
					$comment->approved = 1;

				// Добавляем комментарий в базу
				$comment_id = $this->comments->add_comment($comment);

				// Отправляем email
				$this->notify->email_comment_admin($comment_id);

				// Приберем сохраненную капчу, иначе можно отключить загрузку рисунков и постить старую
				unset($_SESSION['captcha_code']);
				header('location: '.$_SERVER['REQUEST_URI'].'#comment_'.$comment_id);
			}
		}

		// Связанные товары
		$related_ids = array();
		$related_products = array();
		foreach($this->products->get_related_products($product->id) as $p)
		{
			$related_ids[] = $p->related_id;
			$related_products[$p->related_id] = null;
		}
		if(!empty($related_ids))
		{
			foreach($this->products->get_products(array('id'=>$related_ids, 'in_stock'=>1, 'visible'=>1)) as $p)
				$related_products[$p->id] = $p;

			$related_products_images = $this->products->get_images(array('product_id'=>array_keys($related_products)));
			foreach($related_products_images as $related_product_image)
				if(isset($related_products[$related_product_image->product_id]))
					$related_products[$related_product_image->product_id]->images[] = $related_product_image;
			$related_products_variants = $this->variants->get_variants(array('product_id'=>array_keys($related_products), 'in_stock'=>1));
			foreach($related_products_variants as $related_product_variant)
			{
				if(isset($related_products[$related_product_variant->product_id]))
				{
					$related_products[$related_product_variant->product_id]->variants[] = $related_product_variant;
				}
			}
			foreach($related_products as $id=>$r)
			{
				if(is_object($r))
				{
					$r->image = &$r->images[0];
					$r->variant = &$r->variants[0];
				}
				else
				{
					unset($related_products[$id]);
				}
			}
			$this->design->assign('related_products', $related_products);
		}

		// Отзывы о товаре
		$comments = $this->comments->get_comments(array('type'=>'product', 'object_id'=>$product->id, 'approved'=>1, 'ip'=>$_SERVER['REMOTE_ADDR']));

		// Соседние товары
		$this->design->assign('next_product', $this->products->get_next_product($product->id));
		$this->design->assign('prev_product', $this->products->get_prev_product($product->id));

		// И передаем его в шаблон
		$this->design->assign('product', $product);
		$this->design->assign('comments', $comments);

		// Категория и бренд товара
		$product->categories = $this->categories->get_categories(array('product_id'=>$product->id));
		$this->design->assign('brand', $this->brands->get_brand(intval($product->brand_id)));
		$this->design->assign('category', reset($product->categories));

		// Добавление в историю просмотров товаров
		$max_visited_products = 100; // Максимальное число хранимых товаров в истории
		$expire = time()+60*60*24*30; // Время жизни - 30 дней
		if(!empty($_COOKIE['browsed_products']))
		{
			$browsed_products = explode(',', $_COOKIE['browsed_products']);
			// Удалим текущий товар, если он был
			if(($exists = array_search($product->id, $browsed_products)) !== false)
				unset($browsed_products[$exists]);
		}
		// Добавим текущий товар
		$browsed_products[] = $product->id;
		$cookie_val = implode(',', array_slice($browsed_products, -$max_visited_products, $max_visited_products));
		setcookie("browsed_products", $cookie_val, $expire, "/");

		$this->design->assign('meta_title', $product->meta_title);
		$this->design->assign('meta_keywords', $product->meta_keywords);
		$this->design->assign('meta_description', $product->meta_description);

		return $this->design->fetch('product.tpl');
	}

}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using Online_Store.Core.Factories;
using Online_Store.Core.Providers;
using Online_Store.Core.Services;
using Online_Store.Core.Services.User;
using Online_Store.Data;
using Online_Store.Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Online_Store_Tests.Core.Services.User.UserServiceTests
{
    [TestClass]
    public class CheckUsername_Should
    {
        [TestMethod]
        public void ReturnTrue_WhenContextContainsUsername()
        {
            // Arange
            IQueryable<Online_Store.Models.User> users =
                new List<Online_Store.Models.User>
                {
                    new Online_Store.Models.User { Username = "notThisOne" },
                    new Online_Store.Models.User { Username = "goshkata" },
                    new Online_Store.Models.User { Username = "pesho" },
                    new Online_Store.Models.User { Username = "sda" },
                    new Online_Store.Models.User { Username = "Testurcheto" }
                }.AsQueryable();

            var hasherMock = new Mock<IPasswordSecurityHasher>();
            var contextMock = new Mock<IStoreContext>();
            var loggedUserMock = new Mock<ILoggedUserProvider>();
            var factoryMock = new Mock<IModelFactory>();
            string username = "Testurcheto";

            // zaduljitelno trqbva da ima i 4te medota setup-nati
            var setMock = new Mock<DbSet<Online_Store.Models.User>>();
            setMock.As<IQueryable<Online_Store.Models.User>>().Setup(m => m.Provider).Returns(users.Provider);
            setMock.As<IQueryable<Online_Store.Models.User>>().Setup(m => m.Expression).Returns(users.Expression);
            setMock.As<IQueryable<Online_Store.Models.User>>().Setup(m => m.ElementType).Returns(users.ElementType);
            setMock.As<IQueryable<Online_Store.Models.User>>().Setup(m => m.GetEnumerator()).Returns(() => users.GetEnumerator());

            contextMock.Setup(m => m.Users).Returns(setMock.Object);

            var userService = new UserService(hasherMock.Object, contextMock.Object, loggedUserMock.Object,
                factoryMock.Object);

            //// Act && Assert
            Assert.AreEqual(userService.CheckUsername(username), true);
        }
    }
}


text:
using Jambo.Domain.Model;
using Jambo.Producer.Application.Commands;
using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Linq;
using System.Security.Claims;

namespace Jambo.Producer.UI.Filters
{
    public class SchoolFilter : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            ClaimsIdentity identity = context.HttpContext.User.Identity as ClaimsIdentity;

            if (identity.IsAuthenticated)
            {
                string groupSid = identity
                    .Claims
                    .Where(e => e.Type == ClaimTypes.GroupSid)
                    .FirstOrDefault().Value.ToString();

                context.ActionArguments["schoolId"] = new Guid(groupSid);
            }
        }
    }
}


text:
<?php
/**
 * Theme Page Section for our theme.
 *
 * @package ThemeGrill
 * @subpackage Accelerate
 * @since Accelerate 1.0
 */
?>

<?php get_header(); ?>

	<?php do_action( 'accelerate_before_body_content' ); ?>

			<?php while ( have_posts() ) : the_post(); ?>

				<?php get_template_part( 'content', 'page' ); ?>

				<?php
					do_action( 'accelerate_before_comments_template' );
					// If comments are open or we have at least one comment, load up the comment template
					if ( comments_open() || '0' != get_comments_number() )
						comments_template();
	      		do_action ( 'accelerate_after_comments_template' );
				?>

			<?php endwhile; ?>

	<?php accelerate_sidebar_select(); ?>

	<?php do_action( 'accelerate_after_body_content' ); ?>

<?php get_footer(); ?>


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="0dp"
    android:paddingRight="0dp"
    android:paddingTop="0dp"
    android:background="#00000000"
    tools:context=".MainActivity" >

	<ImageView
	    android:id="@+id/play_view"
	    android:layout_width="match_parent"
	    android:layout_height="match_parent"
	    android:layout_above="@+id/music_seekBar"
	    android:layout_alignParentRight="true"
	    android:layout_alignParentTop="true"
	    android:scaleType="centerCrop"
	    android:layout_marginTop="0dp"
	    android:layout_marginLeft="0dp"
	    android:layout_marginRight="0dp"
	    android:src="@drawable/background_android" />

    <ImageButton
        android:id="@+id/play_button"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
                android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_marginBottom="0dp"
        android:src="@drawable/play_selector"
        android:background="#00000000"
        android:text="play" />

     <ImageButton
        android:id="@+id/pause_button"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:src="@drawable/pause_selector"
        android:background="#00000000"
        android:visibility="invisible"
        android:text="pause" />

    <ImageButton
        android:id="@+id/last_button"
        android:layout_alignBaseline="@+id/play_button"
        android:layout_alignBottom="@+id/play_button"
        android:layout_alignLeft="@+id/music_seekBar"
                android:layout_width="40dp"
        android:layout_height="40dp"
        android:src="@drawable/back_selector"
        android:background="#00000000"
        android:text="last" />

    <ImageButton
        android:id="@+id/next_button"
        android:layout_alignBaseline="@+id/play_button"
        android:layout_alignBottom="@+id/play_button"
        android:layout_alignRight="@+id/music_seekBar"
                android:layout_width="40dp"
        android:layout_height="40dp"
        android:src="@drawable/forward_selector"
        android:background="#00000000"
        android:text="next_selector" />

    <SeekBar
        android:id="@+id/music_seekBar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_above="@+id/last_button"
        android:layout_marginLeft="50dp"
        android:layout_marginRight="50dp"
        android:layout_alignParentRight="true" />

    <TextView
        android:id="@+id/music_time_played"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/music_seekBar"
        android:layout_alignTop="@+id/music_seekBar"
        android:layout_toLeftOf="@+id/last_button"
       	android:gravity="center"
        android:layout_marginRight="5dp"
        android:text="00:00"
        android:textColor="@android:color/black"
        android:textSize="10dp" />

    <TextView
        android:id="@+id/music_time_left"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/music_seekBar"
        android:layout_alignTop="@+id/music_seekBar"
        android:layout_toRightOf="@+id/next_button"
        android:layout_marginLeft="5dp"
       	android:gravity="center"
        android:text="00:00"
        android:textColor="@android:color/black"
        android:textSize="10dp" />

</RelativeLayout>


text:
I would say we have:

## Composition --> Markdown

But what about sources ? Does the editor always use "Annexe" ? Could be.

## Markdown --> Composition

We parse everything, including annexe and put the relevant parts in custom
tags or text. Missing custom tags raise errors.

Markdown is used when we do copy/paste and to save bits of code (for reuse or
sharing). Having a storage that is well specified helps avoid the "changing
details" of the editor or the compiler.

## Markdown --> Composition --> Compiler

The compiler (only) understands the Composition format and this is what is used to create the runtime graph.

## Composition [changes] --> Compiler

The change operations are also understood by the compiler to recompile only the required parts. This means that changes to code or any specific paragraph should go through the editor's own API, eventually by simply calling:

```ts
changeParagraph ( path, para, keyPath, value )
// This ends up as set ( `${ path }.data.${ para }.${ keyPath }`, value )
// but it is also used for precise compiler updates.
```


text:
layout: page
title: Salinas Fire Music Dinner
date: 2016-05-24
author: Rebecca Erickson
tags: weekly links, java
status: published
summary: Aenean accumsan malesuada sapien vel faucibus.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 05/04/2016
  endDate: 05/08/2016
  ctyhocn: MTYGAHX
  groupCode: SFMD
published: true
---
Morbi viverra sagittis risus vel sodales. Morbi tincidunt dapibus nisi id fringilla. Quisque magna est, vulputate sit amet neque quis, faucibus accumsan nisl. Nullam a blandit mauris. Vestibulum convallis cursus quam, id fermentum elit sollicitudin at. Nam vel neque vel libero tincidunt faucibus. Vivamus vel quam volutpat, euismod nisi vel, sagittis turpis. Morbi vulputate vitae augue ac volutpat. Praesent varius ipsum sit amet turpis placerat maximus. Cras sem quam, vestibulum sit amet auctor quis, rutrum vel arcu. Suspendisse interdum tincidunt orci quis tempor. Curabitur dictum laoreet ante, a tempus mauris luctus eu. Duis rhoncus enim sit amet libero interdum faucibus. Fusce dictum placerat massa, rhoncus congue mi semper in. Aliquam erat volutpat.

* Aliquam venenatis nisi sit amet risus tincidunt, semper pulvinar velit tristique.

Suspendisse convallis nisi hendrerit mauris gravida auctor. Mauris congue ante quis orci semper mollis. Fusce rhoncus ligula odio, in finibus tellus auctor at. Integer sagittis bibendum hendrerit. Etiam ut tristique ligula. Quisque elementum risus metus, eget malesuada diam pulvinar in. Nunc aliquam lobortis consectetur. Donec ut varius enim.
Nunc dui arcu, gravida eget eros nec, vulputate elementum metus. Nullam gravida sapien sit amet nulla mattis, eu porta mi vulputate. Ut elementum, nisl a consectetur dictum, sapien nunc pellentesque elit, sit amet iaculis erat massa et libero. Suspendisse dapibus lorem ligula, in aliquam mi ultrices in. Nunc egestas nisl et cursus laoreet. Vestibulum vitae aliquet tellus. Integer quis lectus in diam dapibus tristique et a felis.


text:
<?php

namespace LaFourchette\HydraApiBundle\Authentication;

use CommerceGuys\Guzzle\Plugin\Oauth2\Oauth2Plugin;
use Guzzle\Common\Event;
use Guzzle\Http\Client;
use LaFourchette\HydraApiBundle\Business\TokenBusinessInterface;
use LaFourchette\HydraApiBundle\Entity\TokenInterface;
use Symfony\Component\HttpKernel\Log\LoggerInterface;

abstract class AbstractOauth2Authentication implements AuthenticationInterface
{
    /**
     * @var array
     */
    protected $options;

    /**
     * @var LoggerInterface
     */
    protected $logger;

    /**
     * @var Client
     */
    protected $client;

    /**
     * @var array
     */
    protected $credentials;

    /**
     * @var TokenBusinessInterface
     */
    protected $tokenBusiness;

    /**
     * @var TokenInterface
     */
    protected $token;

    /**
     * @var Oauth2Plugin
     */
    protected $plugin;

    /**
     * @param LoggerInterface $logger
     * @param TokenBusinessInterface   $tokenBusiness
     * @param array           $credentials
     * @param array           $options
     */
    public function __construct(
        LoggerInterface $logger,
        TokenBusinessInterface $tokenBusiness,
        array $credentials,
        array $options = array())
    {
        $this->logger = $logger;
        $this->tokenBusiness = $tokenBusiness;

        $this->credentials = $credentials;
        $this->options = $options;

        $this->client = new Client($this->options['base_url'].'oauth/v2/token', $this->options);
    }

    /**
     * {@inheritdoc}
     *
     * @throws \RuntimeException
     */
    public function onRequestError(Event $event)
    {
        if (null === $this->plugin) {
            throw new \RuntimeException('Oauth2Plugin not created, cannot handle request error');
        }
        $this->plugin->onRequestError($event);
    }
}


text:
Scaling Out with Dask
=====================

``DaskExecutor`` allows you to run Airflow tasks in a Dask Distributed cluster.

Dask clusters can be run on a single machine or on remote networks. For complete
details, consult the `Distributed documentation <https://distributed.readthedocs.io/>`_.

To create a cluster, first start a Scheduler:

.. code-block:: bash

    # default settings for a local cluster
    DASK_HOST=127.0.0.1
    DASK_PORT=8786

    dask-scheduler --host $DASK_HOST --port $DASK_PORT

Next start at least one Worker on any machine that can connect to the host:

.. code-block:: bash

    dask-worker $DASK_HOST:$DASK_PORT

Edit your ``airflow.cfg`` to set your executor to ``DaskExecutor`` and provide
the Dask Scheduler address in the ``[dask]`` section.

Please note:

- Each Dask worker must be able to import Airflow and any dependencies you
  require.
- Dask does not support queues. If an Airflow task was created with a queue, a
  warning will be raised but the task will be submitted to the cluster.


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Tweetinvi.Models;
using Tweetinvi.Parameters;
using Xunit;
using Xunit.Abstractions;
using xUnitinvi.TestHelpers;

namespace xUnitinvi.EndToEnd
{
    [Collection("EndToEndTests")]
    public class TweetsEndToEndTests : TweetinviTest
    {
        public TweetsEndToEndTests(ITestOutputHelper logger) : base(logger)
        {
        }

        [Fact]
        public async Task CreateReadDeleteAsync()
        {
            if (!EndToEndTestConfig.ShouldRunEndToEndTests)
                return;

            var sourceTweet = await _protectedClient.Tweets.GetTweetAsync(979753598446948353);

            var quotingTweet1 = await _protectedClient.Tweets.PublishTweetAsync(new PublishTweetParameters("tweetinvi 3.0!")
            {
                QuotedTweetUrl = "https://twitter.com/TweetinviApi/status/979753598446948353",
            });

            var quotingTweet2 = await _protectedClient.Tweets.PublishTweetAsync(new PublishTweetParameters("Tweetinvi 3 v2!")
            {
                QuotedTweet = sourceTweet
            });

            var replyTweet = await _protectedClient.Tweets.PublishTweetAsync(new PublishTweetParameters("Tweetinvi 3 v2!")
            {
                InReplyToTweetId = sourceTweet.Id,
                AutoPopulateReplyMetadata = true
            });

            var fullTweet = await _protectedClient.Tweets.PublishTweetAsync(new PublishTweetParameters("#tweetinvi and https://github.com/linvi/tweetinvi Full Tweet!")
            {
                Coordinates = new Coordinates(37.7821120598956, -122.400612831116),
                DisplayExactCoordinates = true,
                TrimUser = true,
                PlaceId = "3e8542a1e9f82870",
            });

            var tweetinviLogoBinary = File.ReadAllBytes("./tweetinvi-logo-purple.png");
            var media = await _protectedClient.Upload.UploadTweetImageAsync(tweetinviLogoBinary);
            var tweetWithMedia = await _protectedClient.Tweets.PublishTweetAsync(new PublishTweetParameters("tweet with media")
            {
                Medias = { media },
                PossiblySensitive = true,
            });

            var allTweetIdentifiers = new ITweetIdentifier[]
            {
                quotingTweet1,
                quotingTweet2,
                replyTweet,
                fullTweet,
                tweetWithMedia
            };

            var allTweets = await _protectedClient.Tweets.GetTweetsAsync(allTweetIdentifiers);

            await _protectedClient.Tweets.DestroyTweetAsync(quotingTweet1);
            await _protectedClient.Tweets.DestroyTweetAsync(quotingTweet2);
            await _protectedClient.Tweets.DestroyTweetAsync(replyTweet);
            await _protectedClient.Tweets.DestroyTweetAsync(fullTweet);
            await _protectedClient.Tweets.DestroyTweetAsync(tweetWithMedia);

            // ASSERT
            Assert.Equal(979753598446948353, quotingTweet1.QuotedStatusId);
            Assert.Equal(979753598446948353, quotingTweet2.QuotedStatusId);
            Assert.Equal(sourceTweet.Id, replyTweet.InReplyToStatusId);
            Assert.Equal("TweetinviApi", replyTweet.UserMentions[0].ScreenName);

            Assert.Null(fullTweet.CreatedBy.Name);
            Assert.Equal(37, Math.Floor(fullTweet.Coordinates.Latitude));
            Assert.Equal(-122, Math.Ceiling(fullTweet.Coordinates.Longitude));
            Assert.Equal("Toronto", fullTweet.Place.Name);
            Assert.Equal("tweetinvi", fullTweet.Hashtags[0].Text);
            Assert.Single(fullTweet.Entities.Hashtags);
            Assert.Equal("https://github.com/linvi/tweetinvi", fullTweet.Urls[0].ExpandedURL);
            Assert.Single(fullTweet.Entities.Urls);

            Assert.Single(tweetWithMedia.Media);
            Assert.True(tweetWithMedia.PossiblySensitive);

            Assert.True(allTweetIdentifiers.Select(x => x.Id).All(shouldItem => allTweets.Any(isItem => isItem.Id == shouldItem)));
        }

        [Fact]
        public async Task PublishWithMediaIdAsync()
        {
            if (!EndToEndTestConfig.ShouldRunEndToEndTests)
                return;

            var tweetinviLogoBinary = File.ReadAllBytes("./tweetinvi-logo-purple.png");
            var media = await _protectedClient.Upload.UploadBinaryAsync(tweetinviLogoBinary);
            var tweetWithMedia = await _protectedClient.Tweets.PublishTweetAsync(new PublishTweetParameters("tweet with media")
            {
                MediaIds = { media.Id.Value },
                PossiblySensitive = true,
            });

            await _protectedClient.Tweets.DestroyTweetAsync(tweetWithMedia);

            Assert.Equal(tweetWithMedia.Media[0].Id, media.Id.Value);
        }

        [Fact]
        public async Task RetweetsAsync()
        {
            if (!EndToEndTestConfig.ShouldRunEndToEndTests)
                return;

            const long tweetId = 979753598446948353;

            var sourceTweet = await _protectedClient.Tweets.GetTweetAsync(tweetId);
            var retweet = await _protectedClient.Tweets.PublishRetweetAsync(sourceTweet);
            await Task.Delay(TimeSpan.FromSeconds(35)); // for Twitter to sync
            var sourceRetweets = await _protectedClient.Tweets.GetRetweetsAsync(sourceTweet);
            var tweetAfterRetweet = await _protectedClient.Tweets.GetTweetAsync(tweetId);

            var allRetweeterIdsBefore = new List<long>();

            await _protectedClient.Tweets.GetRetweeterIdsAsync(tweetId);
            var retweeterIdsBeforeIterator = _protectedClient.Tweets.GetRetweeterIdsIterator(tweetId);
            while (!retweeterIdsBeforeIterator.Completed)
            {
                allRetweeterIdsBefore.AddRange(await retweeterIdsBeforeIterator.NextPageAsync());
            }

            await _protectedClient.Tweets.DestroyRetweetAsync(retweet);
            var tweetAfterDestroy = await _protectedClient.Tweets.GetTweetAsync(tweetId);

            // assert
            Assert.Equal(tweetAfterRetweet.RetweetCount, sourceTweet.RetweetCount + 1);
            Assert.Equal(retweet.RetweetedTweet.Id, tweetId);
            Assert.Contains(retweet.Id, sourceRetweets.Select(x => x.Id));
            Assert.Contains(retweet.CreatedBy.Id, allRetweeterIdsBefore);
            Assert.Equal(tweetAfterDestroy.RetweetCount, sourceTweet.RetweetCount);
        }

        [Fact]
        public async Task FavoriteAsync()
        {
            if (!EndToEndTestConfig.ShouldRunEndToEndTests)
                return;

            var tweet = await _tweetinviTestClient.Tweets.PublishTweetAsync(Guid.NewGuid().ToString());
            var favoritedAtStart = tweet.Favorited;

            await _tweetinviTestClient.Tweets.FavoriteTweetAsync(tweet);
            var tweetAfterFavoriteCall = await _tweetinviTestClient.Tweets.GetTweetAsync(tweet.Id);
            var inMemoryTweetFavoriteStateAfterFavoriteCall = tweet.Favorited;

            await _tweetinviTestClient.Tweets.GetUserFavoriteTweetsAsync(EndToEndTestConfig.TweetinviTest);

            await _tweetinviTestClient.Tweets.UnfavoriteTweetAsync(tweet);
            var tweetAfterUnfavoriteCall = await _tweetinviTestClient.Tweets.GetTweetAsync(tweet.Id);
            var inMemoryTweetFavoriteStateAfterUnfavoriteCall = tweet.Favorited;

            await _tweetinviTestClient.Tweets.DestroyTweetAsync(tweet);

            // Assert
            Assert.False(favoritedAtStart);
            Assert.True(tweetAfterFavoriteCall.Favorited);
            Assert.True(inMemoryTweetFavoriteStateAfterFavoriteCall);
            Assert.False(tweetAfterUnfavoriteCall.Favorited);
            Assert.False(inMemoryTweetFavoriteStateAfterUnfavoriteCall);
        }

        [Fact]
        public async Task OEmbedTweetsAsync()
        {
            if (!EndToEndTestConfig.ShouldRunEndToEndTests)
                return;

            var tweet = await _tweetinviTestClient.Tweets.PublishTweetAsync(Guid.NewGuid().ToString());
            var oEmbedTweet = await _tweetinviTestClient.Tweets.GetOEmbedTweetAsync(tweet);

            await tweet.DestroyAsync();

            // Assert
            Assert.Contains(tweet.CreatedBy.ScreenName, oEmbedTweet.HTML);
            Assert.Contains(tweet.Text, oEmbedTweet.HTML);
        }
    }
}


text:
<?php
$settings = new Zend\Session\Container('settings');
$lang = substr($settings->settings['language'], 0, 2);

return array(
    'controllers' => array(
        'invokables' => array(
            'Admin\Controller\MasterAdmin'      => 'Admin\Controller\MasterAdminController',
            'Admin\Controller\SystemLog'        => 'Admin\Controller\SystemLogController',
            'Admin\Controller\SystemSettings'   => 'Admin\Controller\SystemSettingsController',
            'Admin\Controller\UserManagement'   => 'Admin\Controller\UserManagementController',
        ),
    ),
    'router' => array(
        'routes' => array(
            'admin' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/:lang/admin[/:controller[/:action[/:param1]]]',
                    'constraints' => array(
                        'lang'          => '[a-z]{2}',
                        'controller'    => '[a-zA-Z][a-zA-Z0-9-_]*',
                        'action'        => '[a-zA-Z][a-zA-Z0-9-_]*',
                        'param1'        =>         '[a-zA-Z0-9-_]*',
                    ),
                    'defaults' => array(
                        '__NAMESPACE__' => 'Admin\Controller',
                        'lang'          => $lang,
                        'controller'    => 'Admin\Controller\SystemSettings',
                        'action'        => 'index',
                    ),
                ),
            ),
        ),
    ),
    'service_manager' => array(
        'aliases' => array(
            'translator' => 'MvcTranslator',
        ),
    ),
    'translator' => array(
        'locale' => $settings->settings['language'],
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),
    'view_manager' => array(
        'template_path_stack' => array(
            'Admin' => __DIR__ . '/../view',
        ),
    ),
);


text:
ver_competencia::ver_competencia(GUI *guiP, Competencia *compP, QWidget *parent) :
    QDialog(parent), gui(guiP),  ui(new Ui::ver_competencia), comp(compP)
{
    ui->setupUi(this);
    QPixmap pix(":/images/Heros64.png");
    ui->label_logo->setPixmap(pix);

    this->setWindowTitle("Ver competencias deportivas");

    ui->tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);

    QString nombre = "Competencia " + compP->getNombre();
    ui->label->setText(nombre);
    ui->label_7->setText(compP->getModalidad()->getTipoMod()->getNombre());
    ui->label_8->setText(compP->getDeporte()->getNombre());

    ui->label_9->setText(compP->getEstado()->getNombre());
    ui->tableWidget->resizeColumnsToContents();
    ui->checkBox->setCheckable(false);

    //Si la competencia no está en estado creada, se permite ver el fixture y se tilda el checkbox
    if (compP->getEstado()->getNombre().toLower() != "creada"){
        ui->checkBox->setCheckable(true);
        ui->checkBox->setChecked(true);
        ui->checkBox->setDisabled(true);
        ui->pushButton_4->setEnabled(true);
    }
    else {
        ui->pushButton_4->setDisabled(true);

    }

    if(compP->getEstado()->getNombre().toLower() == "en disputa" || compP->getEstado()->getNombre().toLower() == "finalizada" ){
        ui->pushButton_5->setDisabled(true);
    }
    // si la competencia no esta planificada o en disputa no se muestra la tabla
    if (!(compP->getEstado()->getNombre().toLower() == "planificada" || compP->getEstado()->getNombre().toLower() == "en disputa")){
        ui->tableWidget->hide();
        ui->label_6->hide();
    }
    else{
        QVector<Partido*> proxEnc = comp->getProximosEncuentros() ;
        if(proxEnc.size() == 0){

        }
        else{

            for (int i = 0; i < proxEnc.size(); ++i) {
                ui->tableWidget->insertRow(i);
                ui->tableWidget->setItem(i,0,new QTableWidgetItem(proxEnc[i]->getEquipoA()->getNombre()));
                ui->tableWidget->setItem(i,1,new QTableWidgetItem(proxEnc[i]->getEquipoB()->getNombre()));
                ui->tableWidget->setItem(i,2,new QTableWidgetItem(QString::number(proxEnc[i]->getFecha())));

            }
            ui->tableWidget->resizeColumnsToContents();
            int width = (ui->tableWidget->columnCount() - 1) + ui->tableWidget->verticalHeader()->width();
            for(int column = 0; column < ui->tableWidget->columnCount(); column++)
            width = width + ui->tableWidget->columnWidth(column);
            width+=40;
            ui->tableWidget->setMinimumWidth(width);
            this->resize(sizeHint().width(),573);
        }
    }
}

void ver_competencia::actualizar(Competencia* nuevaComp)
{
    Competencia* compP = comp;
    QString nombre = "Competencia " + compP->getNombre();
    ui->label->setText(nombre);
    ui->label_7->setText(compP->getModalidad()->getTipoMod()->getNombre());
    ui->label_8->setText(compP->getDeporte()->getNombre());

    ui->label_9->setText(compP->getEstado()->getNombre());
    ui->tableWidget->resizeColumnsToContents();

    //Si la competencia no está en estado creada, se permite ver el fixture y se tilda el checkbox
    if (compP->getEstado()->getNombre().toLower() != "creada"){
        ui->checkBox->setCheckable(true);
        ui->checkBox->setChecked(true);
        ui->checkBox->setDisabled(true);
        ui->pushButton_4->setEnabled(true);
    }
    else {
        ui->pushButton_4->setDisabled(true);
        ui->checkBox->setCheckable(false);
    }

    if(compP->getEstado()->getNombre().toLower() == "en disputa" || compP->getEstado()->getNombre().toLower() == "finalizada" ){
        ui->pushButton_5->setDisabled(true);
    }
    // si la competencia no esta planificada o en disputa no se muestra la tabla
    if (!(compP->getEstado()->getNombre().toLower() == "planificada" || compP->getEstado()->getNombre().toLower() == "en disputa")){
        ui->tableWidget->setRowCount(0);
        ui->tableWidget->hide();
        ui->label_6->hide();
        this->resize(495,573);
    }
    else{
        QVector<Partido*> proxEnc = comp->getProximosEncuentros() ;
        if(proxEnc.size() == 0){
            ui->tableWidget->setRowCount(0);
            ui->tableWidget->hide();
            ui->label_6->hide();
            this->resize(495,573);
        }
        else{
            ui->tableWidget->setRowCount(0);
            for (int i = 0; i < proxEnc.size(); ++i) {
                ui->tableWidget->insertRow(i);
                ui->tableWidget->setItem(i,0,new QTableWidgetItem(proxEnc[i]->getEquipoA()->getNombre()));
                ui->tableWidget->setItem(i,1,new QTableWidgetItem(proxEnc[i]->getEquipoB()->getNombre()));
                ui->tableWidget->setItem(i,2,new QTableWidgetItem(QString::number(proxEnc[i]->getFecha())));

            }
            ui->tableWidget->resizeColumnsToContents();
            int width = (ui->tableWidget->columnCount() - 1) + ui->tableWidget->verticalHeader()->width();
            for(int column = 0; column < ui->tableWidget->columnCount(); column++)
            width = width + ui->tableWidget->columnWidth(column);
            width+=20;
            ui->tableWidget->setMinimumWidth(width);
            this->resize(sizeHint().width(),573);
        }
    }
}

ver_competencia::~ver_competencia()
{
    delete ui;
}

void ver_competencia::on_pushButton_7_clicked() //Salir
{
    delete comp;
    this->close();
}

void ver_competencia::on_pushButton_5_clicked() //Generar fixture
{
    QString error;
    if (gui->handleVerCompetencia(this,QString("generarFixture"), error,comp)){
        //Se coloca el tilde en el checkbox y se permite ver el fixture
        ui->checkBox->setCheckable(true);
        ui->checkBox->setChecked(true);
        ui->checkBox->setDisabled(true);
        ui->pushButton_4->setEnabled(true);

        //También se muestran los próximos encuentros
        ui->tableWidget->show();
        ui->label_6->show();
        QVector<Partido*> proxEnc = comp->getProximosEncuentros();
        ui->tableWidget->setRowCount(0);
        qDebug()<<"proxEnc size = "<<proxEnc.size();
        for (int i = 0; i < proxEnc.size(); ++i) {
            ui->tableWidget->insertRow(i);
            ui->tableWidget->setItem(i,0,new QTableWidgetItem(proxEnc[i]->getEquipoA()->getNombre()));
            ui->tableWidget->setItem(i,1,new QTableWidgetItem(proxEnc[i]->getEquipoB()->getNombre()));
            ui->tableWidget->setItem(i,2,new QTableWidgetItem(QString::number(proxEnc[i]->getFecha())));

        }
        ui->tableWidget->resizeColumnsToContents();
        int width = (ui->tableWidget->columnCount() - 1) + ui->tableWidget->verticalHeader()->width();
        for(int column = 0; column < ui->tableWidget->columnCount(); column++)
        width = width + ui->tableWidget->columnWidth(column);
        ui->tableWidget->setMinimumWidth(width);
        this->resize(sizeHint().width(),573);

        //Se cambia el estado de la competencia
        ui->label_9->setText(comp->getEstado()->getNombre());
        if(comp->getEstado()->getNombre().toLower() == "en disputa"){

            ui->pushButton_5->setDisabled(true);
        }
    }
    else{
        QMessageBox* msg = new QMessageBox(this);
        msg->setText(error);
        QPixmap icono(":/images/Heros-amarillo-64.png");
        msg->setIconPixmap(icono);
        msg->setModal(true);
        msg->exec();
    }

}

void ver_competencia::on_pushButton_6_clicked() //Mostrar tabla posiciones
{
    // si la competencia está en disputa o finalizada y es de liga se muestra la tabla, si no, no
    if((comp->getEstado()->getNombre().toLower() == "en disputa" ||
        comp->getEstado()->getNombre().toLower() == "finalizada" ) &&
        comp->getModalidad()->getTipoMod()->getNombre().toLower() == "liga")
    {
        QString error;
        gui->handleVerCompetencia(this,QString("mostrarTablasPosiciones"),error,comp);

    }
    else if(comp->getModalidad()->getTipoMod()->getNombre().toLower() != "liga"){
        QMessageBox* msg = new QMessageBox(this);
        QString error = "No es posible mostrar la tabla de posiciones, la competencia no es de la modalidad de liga";
        msg->setText(error);
        QPixmap icono(":/images/Heros-rojo-64.png");
        msg->setIconPixmap(icono);
        msg->setModal(true);
        msg->exec();
    }
    else{
        QMessageBox* msg = new QMessageBox(this);
        QString error = "No es posible mostrar la tabla de posiciones, la competencia no está en disputa o finalizada";
        msg->setText(error);
        QPixmap icono(":/images/Heros-rojo-64.png");
        msg->setIconPixmap(icono);
        msg->setModal(true);
        msg->exec();
    }
}

void ver_competencia::on_pushButton_4_clicked() //Mostrar fixture
{
    QString error;
    gui->handleVerCompetencia(this,QString("mostrarFixture"),error,comp);
}

void ver_competencia::on_pushButton_clicked() //Listar participantes
{
    QString error;
    gui->handleVerCompetencia(this,QString("listarParticipantes"),error,comp);
}

void ver_competencia::on_checkBox_stateChanged(int arg1)
{
    if(arg1 == 0){
        ui->pushButton_4->setDisabled(true);
    }
    else if(arg1 == 2){
        ui->pushButton_4->setEnabled(true);
    }
}


text:
namespace Stripe.Issuing
{
    using System.Collections.Generic;
    using Newtonsoft.Json;

    public class TransactionUpdateOptions : BaseOptions, IHasMetadata
    {
        ///
        /// Set of key-value pairs that you can
        /// attach to an object. This can be useful for storing additional information about the
        /// object in a structured format. Individual keys can be unset by posting an empty value to
        /// them. All keys can be unset by posting an empty value to <c>metadata</c>.
        ///
        [JsonProperty("metadata")]
        public Dictionary<string, string> Metadata { get; set; }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingLeft="@dimen/widget_margin"
    android:paddingRight="@dimen/widget_margin"
    android:paddingBottom="@dimen/widget_margin"
    android:descendantFocusability="blocksDescendants">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="130dp"
        android:background="@color/white">

        <LinearLayout
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginBottom="5dp"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="5dp"
                android:layout_weight="2">

                <ImageView
                    android:layout_width="130dp"
                    android:layout_height="110dp"
                    android:background="@drawable/defult_course"
                    />
            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginBottom="5dp"
                android:layout_marginLeft="10dp"
                android:layout_marginTop="5dp"
                android:layout_weight="3"
                android:orientation="vertical">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="录播"
                    android:textColor="@color/grey_4"
                    android:textSize="14sp"
                    />

                <TextView
                    android:id="@+id/course_name"
                    android:maxLength="20"
                    android:singleLine="true"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="20dp"
                    android:text="木工工艺不在沉寂"
                    android:textColor="@color/grey_text_mycourse"
                    android:textSize="16sp"
                    />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="30dp"
                    android:text="等待开播"
                    android:textColor="@color/grey_4"
                    android:textSize="12sp"
                    />

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginRight="10dp"
                android:layout_weight="1"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:text="80"
                    android:textColor="@color/wd_theme_color"
                    android:textSize="30dp"/>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:text="%"
                    android:textColor="@color/grey_text_mycourse"/>
            </LinearLayout>
        </LinearLayout>
        <ImageView
            android:layout_marginBottom="2dp"
            android:layout_alignParentBottom="true"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/grey_3"
            />

        <ImageView
            android:visibility="gone"
            android:id="@+id/course_image"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="fitXY"
            tools:src="@drawable/sample_course_image" />

        <RelativeLayout
            android:visibility="gone"
            android:id="@+id/course_item_detail"
            android:layout_width="match_parent"
            android:layout_height="@dimen/course_detail_card_height"
            android:layout_alignParentBottom="true"
            android:background="@color/transparent_white_85"
            android:paddingEnd="10dp"
            android:paddingLeft="10dp"
            android:paddingRight="10dp"
            android:paddingStart="10dp"
            android:paddingTop="10dp"
            tools:targetApi="17">

            <TextView

                style="@style/course_card_title"
                tools:text="@string/course_name" />

            <LinearLayout
                android:id="@+id/new_course_content_layout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"

                tools:targetApi="17">

                <View
                    android:id="@+id/ellipsis_icon"
                    android:layout_width="8dp"
                    android:layout_height="8dp"
                    android:layout_gravity="center_vertical"
                    android:background="@drawable/cyan_circle" />

                <TextView
                    android:id="@+id/new_course_content"
                    style="@style/bold_cyan_text"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:contentDescription="@string/new_course_content"
                    android:paddingEnd="0dp"
                    android:paddingLeft="3dp"
                    android:paddingRight="0dp"
                    android:paddingStart="3dp"
                    android:text="@string/new_course_content"
                    android:textAllCaps="true"
                    android:textSize="@dimen/edx_xxx_small"
                    tools:targetApi="17" />
            </LinearLayout>

            <TextView
                android:id="@+id/starting_from"
                style="@style/course_card_course_run"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"

                tools:targetApi="17"
                tools:text="Coming Soon" />

            <TextView
                android:id="@+id/course_run"
                style="@style/course_card_course_run"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"

                android:layout_gravity="center_vertical"
                android:layout_toRightOf="@+id/new_course_content_layout"
                tools:targetApi="17"
                tools:text="MITx | CS501" />
        </RelativeLayout>

        <!-- put a frame over this cell, so that corners look rounded -->
        <ImageView
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/ic_card" />
    </RelativeLayout>
</FrameLayout>


text:
module.exports = function() {
  // XXX should mark config file paths as dependencies but this requires adding api to the config module
  this.cacheable(true);
  var config = require(__dirname+'/config')(this.query.slice(1));
  return "module.exports = " + JSON.stringify(config) + ';';
};


text:
package org.wso2.developerstudio.eclipse.distribution.project.ui.wizard;

import java.io.File;
import java.util.List;

import org.apache.maven.project.MavenProject;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.ui.IExportWizard;
import org.eclipse.ui.IWorkbench;
import org.wso2.developerstudio.eclipse.distribution.project.Activator;
import org.wso2.developerstudio.eclipse.distribution.project.util.ArtifactTypeMapping;
import org.wso2.developerstudio.eclipse.distribution.project.util.DistProjectUtils;
import org.wso2.developerstudio.eclipse.esb.project.artifact.ESBArtifact;
import org.wso2.developerstudio.eclipse.esb.project.artifact.ESBProjectArtifact;
import org.wso2.developerstudio.eclipse.logging.core.IDeveloperStudioLog;
import org.wso2.developerstudio.eclipse.logging.core.Logger;
import org.wso2.developerstudio.eclipse.platform.core.project.export.util.ExportUtil;
import org.wso2.developerstudio.eclipse.platform.core.utils.Constants;
import org.wso2.developerstudio.eclipse.utils.file.FileUtils;

public class ProjectExportWizard extends Wizard implements IExportWizard {
	private ExportDetailsWizardPage detailsPage;
	private final int ESB_PROJECT=1;
	private final int GENERAL_PROJECT=2;
	private static IDeveloperStudioLog log=Logger.getLog(Activator.PLUGIN_ID);

	public void init(IWorkbench wb, IStructuredSelection selection) {
		detailsPage = new ExportDetailsWizardPage(wb, selection);

	}

	public void addPages() {
		addPage(detailsPage);
		super.addPages();
	}

	public boolean performFinish() {
		MessageBox exportMsg = new MessageBox(getShell(), SWT.ICON_ERROR);
		exportMsg.setText("WSO2 Platform Distribution");
		IProject project = detailsPage.getSelectedProject();
		try {
			if(project.hasNature(Constants.AXIS2_PROJECT_NATURE) ||
					   project.hasNature(Constants.BPEL_PROJECT_NATURE) ||
					   project.hasNature(Constants.DS_VALIDATOR_PROJECT_NATURE) ||
					   project.hasNature(Constants.JAXWS_PROJECT_NATURE) ||
					   project.hasNature(Constants.JAXRS_PROJECT_NATURE) ||
					   project.hasNature(Constants.WEBAPP_PROJECT_NATURE) ||
					   project.hasNature(Constants.GADGET_PROJECT_NATURE) ||
					   project.hasNature(Constants.LIBRARY_PROJECT_NATURE) ||
					   project.hasNature(Constants.MEDIATOR_PROJECT_NATURE) ||
					   project.hasNature(Constants.REGISTRY_FILTER_PROJECT_NATURE) ||
					   project.hasNature(Constants.REGISTRY_HANDLER_PROJECT_NATURE) ||
					   project.hasNature(Constants.CARBON_UI_PROJECT_NATURE)||
					   project.hasNature(Constants.ANALYTICS_PROJECT_NATURE)||
					   project.hasNature(Constants.BRS_PROJECT_NATURE)||
					   project.hasNature(Constants.JAGGERY_NATURE)){
				exportArchivable(project);
			} else if(project.hasNature(Constants.ESB_PROJECT_NATURE)){
				exportNonArchivable(project,ESB_PROJECT);
			} else if(project.hasNature(Constants.GENERAL_PROJECT_NATURE)){
				exportNonArchivable(project,GENERAL_PROJECT);
			}
		} catch (Exception e) {
			log.error("An error occured while creating the archive file", e);
			exportMsg
					.setMessage("An error occured while creating the archive file. For more details view the log.");
			exportMsg.open();
		}
		setSessionProperty();
		return true;
	}
	private void setSessionProperty(){
        try {
        	detailsPage.getSelectedProject().setSessionProperty(new QualifiedName("",detailsPage.getSelectedProject().getName()),
					detailsPage.getTxtExportPathText().getText());
		} catch (CoreException e) {
			log.error("Error geting session properties", e);
		}
	}

	private void exportArchivable(IProject project) throws Exception{
		String cAppType = "";
		MavenProject mavenProject;
		String ext = "";
		String finalFileName = "";
		mavenProject = DistProjectUtils.getMavenProject(project);
		cAppType = mavenProject.getModel().getPackaging();
		String version = mavenProject.getModel().getVersion();
		if (cAppType == null
				|| !ArtifactTypeMapping.isValidArtifactType(cAppType)) {
			if (mavenProject.getModel().getProperties()
					.containsKey("CApp.type")) {
				cAppType = (String) mavenProject.getModel().getProperties()
						.get("CApp.type");
			}
		}
		List<IResource> archive = ExportUtil.buildProject(
				detailsPage.getSelectedProject(), cAppType);
		if (archive.size() == 1) {
			ext = ArtifactTypeMapping.getType(cAppType);
			finalFileName = String.format("%s_%s.%s", project.getName(),
					version, ext);
			File destFileName = new File(detailsPage.getExportPath(),
					finalFileName);
            if(destFileName.exists()){
                org.apache.commons.io.FileUtils.deleteQuietly(destFileName);
            }
			FileUtils.copy(archive.get(0).getLocation().toFile(), destFileName);
		} else {
			throw new Exception("No resource found that matches the given type " + cAppType);
		}
	}

	private void exportNonArchivable(IProject project, int type) throws Exception{
		MavenProject mavenProject = DistProjectUtils.getMavenProject(project);
		String version = mavenProject.getModel().getVersion();
		String finalFileName = String.format("%s_%s", project.getName(),
		version);
		File destFileName = new File(detailsPage.getExportPath(),
		finalFileName);
		IFile artifactXMLFile = project.getFile(Constants.ARTIFACT_XML);
		if (artifactXMLFile.exists()) {
			ESBProjectArtifact artifactXMLDoc = new ESBProjectArtifact();
				artifactXMLDoc.fromFile(artifactXMLFile.getLocation().toFile());
				List<ESBArtifact> artifacts = artifactXMLDoc.getAllESBArtifacts();
				if(type==ESB_PROJECT){
					exportESBArtifact(artifacts,project,destFileName);
				} else if (type==GENERAL_PROJECT){
					exportRegResources(artifacts,project,destFileName);
				}
		}
	}

	private void exportESBArtifact(List<ESBArtifact> artifacts,
			IProject project, File dir) throws Exception {
		File synapseConfigDir = new File(dir, "synapse-config");
		File endpointsDir = new File(synapseConfigDir, "endpoints");
		File localEntriesDir = new File(synapseConfigDir, "local-entries");
		File proxyServicesDir = new File(synapseConfigDir, "proxy-services");
		File sequencesDir = new File(synapseConfigDir, "sequences");
		File tasksDir = new File(synapseConfigDir, "tasks");
		File apiDir = new File(synapseConfigDir, "api");
		File templatesDir = new File(synapseConfigDir, "templates");
		File messageStoresDir = new File(synapseConfigDir, "message-stores");
		File messageProcessorsDir = new File(synapseConfigDir, "message-processors");
		File eventSourcesDir = new File(synapseConfigDir, "event-sources");
		File priorityExecutorsDir = new File(synapseConfigDir, "priority-executors");
		if (!synapseConfigDir.exists())
			synapseConfigDir.mkdirs();
		if (!endpointsDir.exists())
			endpointsDir.mkdirs();
		if (!proxyServicesDir.exists())
			proxyServicesDir.mkdirs();
		if (!localEntriesDir.exists())
			localEntriesDir.mkdirs();
		if (!sequencesDir.exists())
			sequencesDir.mkdirs();
		if (!tasksDir.exists())
			tasksDir.mkdirs();
		if (!apiDir.exists())
			apiDir.mkdirs();
		if (!templatesDir.exists())
			templatesDir.mkdirs();
		if (!messageStoresDir.exists())
			messageStoresDir.mkdirs();
		if (!messageProcessorsDir.exists())
			messageProcessorsDir.mkdirs();
		if (!eventSourcesDir.exists())
			eventSourcesDir.mkdirs();
		if (!priorityExecutorsDir.exists())
			priorityExecutorsDir.mkdirs();
		for (ESBArtifact artifact : artifacts) {
			String type = artifact.getType();
			File file = project.getFile(artifact.getFile()).getLocation().toFile();
			File dstFile=null;
			if(file.exists()){
				String artifactFile = file.getName();
				if("synapse/local-entry".equals(type)){
					dstFile = new File(localEntriesDir,artifactFile);
				} else if("synapse/proxy-service".equals(type)){
					dstFile = new File(proxyServicesDir,artifactFile);
				} else if("synapse/endpoint".equals(type)){
					dstFile = new File(endpointsDir,artifactFile);
				} else if("synapse/sequence".equals(type)){
					dstFile = new File(sequencesDir,artifactFile);
				} else if("synapse/configuration".equals(type)){
					dstFile = new File(synapseConfigDir,artifactFile);
				} else if("synapse/task".equals(type)){
					dstFile = new File(tasksDir,artifactFile);
				} else if("synapse/api".equals(type)){
					dstFile = new File(apiDir,artifactFile);
				} else if("synapse/template".equals(type)){
					dstFile = new File(templatesDir,artifactFile);
				} else if("synapse/message-store".equals(type)){
					dstFile = new File(messageStoresDir,artifactFile);
				} else if("synapse/message-processors".equals(type)){
					dstFile = new File(messageProcessorsDir,artifactFile);
				} else if("synapse/event-source".equals(type)){
					dstFile = new File(eventSourcesDir,artifactFile);
				} else if("synapse/priority-executor".equals(type)){
					dstFile = new File(priorityExecutorsDir,artifactFile);
				} else{
					log.warn("ignoring unrecognized type " + type);
					continue;
				}
                if(dstFile.exists()){
                    org.apache.commons.io.FileUtils.deleteQuietly(dstFile);
                }
				FileUtils.copy(file, dstFile);
			}
		}
	}

	private void exportRegResources(List<ESBArtifact> artifacts,IProject project,File dir) throws Exception{
		List<IResource> buildProject = ExportUtil.buildProject(
				project,
				"registry/resource");
		for(IResource res : buildProject) {
			if(res instanceof IFolder){
				File dstFile= new File(dir,res.getName());
                if(dstFile.exists()){
                    org.apache.commons.io.FileUtils.deleteQuietly(dstFile);
                }
				FileUtils.copyDirectory(res.getLocation().toFile(),
						dstFile);
			}
		}
	}
}


text:
import os

import numpy as np
from decimal import Decimal
from sqlalchemy import create_engine

from src.settings import STATUSES, MYSQL_TABLE, DB_IDS
if os.environ.get('localhost_app'):
    from src.settings import MYSQL_USER, MYSQL_PASSWD, MYSQL_HOST, MYSQL_DB

class ResultDB:
    insert_query = 'INSERT INTO {0}({1}) VALUES({2}) RETURNING id;'
    update_status_query = 'UPDATE {0} SET status={1} WHERE id={2};'
    update_results_query = 'UPDATE {0} SET score={1}, {2} WHERE id={3};'
    get_status_query = 'SELECT status from {0} WHERE id={1};'
    get_benchmark_query = 'SELECT * from {0} WHERE id={1};'
    get_all_query = 'SELECT * from {0} where db_system={1} and status=\'done\';'

    def __init__(self):
        self.url = 'postgresql+psycopg2://{user}:{passwd}@{host}/{dbname}'.format(
            user=MYSQL_USER,
            passwd=MYSQL_PASSWD,
            host=MYSQL_HOST,
            dbname=MYSQL_DB
        ) if os.environ.get('localhost_app') else os.environ.get('DATABASE_URL')
        self.conn = create_engine(self.url, isolation_level='AUTOCOMMIT')

    def create_benchmark(self, system, name):
        query = self.insert_query.format(
            MYSQL_TABLE,
            'status, db_system, db_name',
            ''.join('{},'.format(self.escape_values(x)) for x in [STATUSES['IN_PROGRESS'], system, name]).rstrip(',')
        )
        return self.conn.execute(query).fetchone()[0], STATUSES['IN_PROGRESS']

    def update_status(self, benchmark_id, status):
        query = self.update_status_query.format(
            MYSQL_TABLE,
            self.escape_values(status),
            benchmark_id
        )
        self.conn.execute(query)

    def update_results(self, benchmark_id, results):
        query = self.update_results_query.format(
            MYSQL_TABLE,
            sum(results.values()),
            ''.join(['{}_time={},'.format(key, value) for key, value in results.items()]).rstrip(','),
            benchmark_id
        )
        self.conn.execute(query)

    def get_status(self, benchmark_id):
        query = self.get_status_query.format(
            MYSQL_TABLE,
            benchmark_id
        )
        return self.conn.execute(query).fetchone()[0]

    def get_results(self, benchmark_id):
        query = self.get_benchmark_query.format(
            MYSQL_TABLE,
            benchmark_id
        )
        benchmark = dict(zip(self.conn.execute(query).keys(), self.conn.execute(query).fetchone()))

        query_all = self.get_all_query.format(
            MYSQL_TABLE,
            self.escape_values(benchmark['db_system'])
        )
        all_result = self.conn.execute(query_all)
        all_benchmarks = sorted([dict(zip(all_result.keys(), x)) for x in self.conn.execute(query_all)],
                                key=lambda x: x['score'])
        all_benchmarks = [self.replace_decimals(x) for x in all_benchmarks]

        scores = [(float(x['score']), str(x['id'])) for x in all_benchmarks]
        quantiles = [
            all_benchmarks[round(x*len(scores)-1)]
            for name, x in [('first', 0.25), ('second', 0.50), ('third', 0.75)]
        ]

        return dict(
            systemName=next(name.upper() for name, id_ in DB_IDS.items() if str(id_) == benchmark['db_system']),
            totalBenchmarksCount=len(all_benchmarks),
            bestTotalTime=all_benchmarks[0],
            worstTotalTime=all_benchmarks[-1],
            rankingPosition=next(i for i, x in enumerate(all_benchmarks) if str(x['id']) == benchmark_id),
            systemOtherResults=quantiles,
            benchmarkResult=self.replace_decimals(benchmark)
        )

    def get_list(self, system_id):
        query = self.get_all_query.format(MYSQL_TABLE, self.escape_values(system_id))
        all_result = self.conn.execute(query)
        all_benchmarks = sorted([dict(zip(all_result.keys(), x)) for x in all_result],
                                key=lambda x: x['score'])
        return [
            {
                'id': x['id'],
                'score': float(x['score']),
                'db_name': x['db_name'],
                'benchmark_date': str(x['benchmark_date'])
            }
            for x in all_benchmarks
        ]

    def escape_values(self, s):
        return '\'{}\''.format(s)

    def replace_decimals(self, item):
        result = {}
        for key, value in item.items():
            result[key] = float(value) if isinstance(value, Decimal) else str(value)
        return result


text:
@implementation Vertretung

#pragma mark - Vertretungsstunden erstellen
+ (Vertretung *)vertretungFuerSchulstunde:(Schulstunde *)schulstunde inManagedObjectContext:(NSManagedObjectContext *)context {
    if (context) {
        Vertretung *neueVertretung = [NSEntityDescription
                                      insertNewObjectForEntityForName:@"Vertretung"
                                      inManagedObjectContext:context];
        neueVertretung.schulstunde = schulstunde;

        return neueVertretung;
    }

    return nil;
}

#pragma mark - Eigenschaften über Vertretungsstunden zurückgeben
- (BOOL)isRaumVertretung {
    if (![self.schulstunde.raumnummer isEqualToString:self.raum]) {
        return YES;
    }

    return NO;
}

- (BOOL)isFrei {

    //unterscheide im folgenden zwischen mehreren Fällen, weil die Vertretungsplan-Dateien aus Untis wohl so exportiert werden, dass wenn eine Stunde ausfällt, dies oft durch jeweils unterschiedliche (was oft wahrscheinlich auch mit dem Grund des Ausfalls zusammenhängt) Eigenschafts-Felder der Vertretungsstunde deutlich gemacht wird

    //wenn Vertretungsplan-Vertretungsart ist gleich "C" (für Cancel=Entfall der Stunde) --> dann ist die Stunde schonmal frei
    if ([self.art isEqualToString:@"C"]) {
        return YES;
    }
    //der String "32" im artBitfields-Feld sollte auch angeben, dass die Stunde frei ist...
    else if ([self.artBitfields isEqualToString:@"32"]) {
        return YES;
    }

    return NO;
}

@end


text:
'use strict';

var winston = require('winston');

var getLogger = function(module) {
    var path = module.filename.split('/').slice(-2).join('/');

    return new winston.Logger({
        transports: [
            new winston.transports.Console({
                colorize: true,
                level: 'debug',
                label: path
            }),
            new (winston.transports.File)({filename: 'debug.log', silent: false})
        ]
    });
};

module.exports = getLogger;


text:
<?php

return array(
    'active' => 'svgs',
    'fallback' => 'master',
    'paths' => array(			// theme files are outside the DOCROOT here
        APPPATH.'themes',
    ),
    'assets_folder' => 'themes',	// so this implies <localpath>/public/themes/<themename>...
    'view_ext' => '.html',
    'info_file_name' => 'theme.info',
    'require_info_file' => false,
    'info_file_type' => 'php',
    'use_modules' => true,
);
?>