text:
namespace TMDbLib.Objects.Lists
{
    internal class ListStatus
    {
        public string Id { get; set; }
        public bool ItemPresent { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
import { ReactElement } from "react";
import logo from "../images/logo.svg";
import Nav from "./nav";
import StaticImage from "./static-image";

export default function Hero(): ReactElement {
  return (

        <StaticImage
          alt="blurred logo"
          src={logo.src}
          width="400"
          height="400"
        />

          Erik Brinkman

  );
}


text:
<?php

namespace PPI\FrameworkTest\ServiceManager\Fixtures;

use Zend\ServiceManager\AbstractFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class BarAbstractFactory implements AbstractFactoryInterface
{
    public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        if ($name != 'bar') {
            return false;
        }

        return true;
    }

    public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
    {
        return new Bar(array());
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Disk information. */
@Fluent
public final class DiskInformation {
    /*
     * The lun property.
     */
    @JsonProperty(value = "lun")
    private Integer lun;

    /*
     * The name property.
     */
    @JsonProperty(value = "name")
    private String name;

    /** Creates an instance of DiskInformation class. */
    public DiskInformation() {
    }

    /**
     * Get the lun property: The lun property.
     *
     * @return the lun value.
     */
    public Integer lun() {
        return this.lun;
    }

    /**
     * Set the lun property: The lun property.
     *
     * @param lun the lun value to set.
     * @return the DiskInformation object itself.
     */
    public DiskInformation withLun(Integer lun) {
        this.lun = lun;
        return this;
    }

    /**
     * Get the name property: The name property.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name property.
     *
     * @param name the name value to set.
     * @return the DiskInformation object itself.
     */
    public DiskInformation withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}


text:
SYNONYM

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

#### Published in
Nouv. Fl. Environs Paris 46 (1821)

#### Original name
Boletus rufus Schaeff., 1763

### Remarks
null


text:
A software deployment optimizer using an ant colony system

Requirements:
	- Java 7
	- Apache Commons CSV 1.2

The software tries to optimize a deployment of software components defined
in `components.dat` on servers defined in `vm.dat`. Each row in `components.dat`
corresponds to a software component with a given performance requirement and an
availability requirement, separated by tabs. Each row in `vm.dat` corresponds to
a server with its performance, availability and cost separated by tabs. The sum
of performance requirements for components assigned to a server may not exceed
the available performance of the server. A component may not be assigned to a
server with less availability than the component requires. The software produces
non-dominated solutions that maximize the performance, cost and availability.


text: This is the Issues view


text:
#include "tensorflow/core/framework/common_shape_fns.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/shape_inference.h"
#include "tensorflow/core/ops/ragged_to_dense_util.h"

namespace tensorflow {

using errors::InvalidArgument;
using shape_inference::DimensionHandle;
using shape_inference::InferenceContext;
using shape_inference::ShapeHandle;

namespace {
tensorflow::Status ValidateRowPartitionTypesAndShapes(
    const std::vector<RowPartitionType>& row_partition_types,
    InferenceContext* c) {
  // Note: the allowed types may be extended in the future.
  for (RowPartitionType row_partition_type : row_partition_types) {
    switch (row_partition_type) {
      case RowPartitionType::FIRST_DIM_SIZE:
      case RowPartitionType::VALUE_ROWIDS:
      case RowPartitionType::ROW_SPLITS:
        break;
      default:
        return InvalidArgument("Unsupported partition type: ",
                               RowPartitionTypeToString(row_partition_type));
    }
  }

  if (row_partition_types.empty()) {
    return InvalidArgument("Partition info types should not be empty");
  }
  for (int i = 1; i < row_partition_types.size(); ++i) {
    if (row_partition_types[i] == RowPartitionType::FIRST_DIM_SIZE) {
      return InvalidArgument("FIRST_DIM_SIZE must be first");
    }
  }
  if (row_partition_types[0] == RowPartitionType::FIRST_DIM_SIZE &&
      (row_partition_types.size() < 2 ||
       row_partition_types[1] != RowPartitionType::VALUE_ROWIDS)) {
    return InvalidArgument("FIRST_DIM_SIZE must be followed by VALUE_ROWIDS");
  }
  if (row_partition_types[0] == RowPartitionType::VALUE_ROWIDS) {
    return InvalidArgument("VALUE_ROWIDS cannot be first");
  }

  int num_row_partition_tensors;
  TF_RETURN_IF_ERROR(
      c->GetAttr("num_row_partition_tensors", &num_row_partition_tensors));
  if (num_row_partition_tensors != row_partition_types.size()) {
    return InvalidArgument(
        "Number of row partition tensors (", num_row_partition_tensors,
        ") does not equal the number of row partition types(",
        row_partition_types.size(), ").");
  }

  for (int i = 0; i < num_row_partition_tensors; ++i) {
    TensorShapeProto partition_shape;
    c->ShapeHandleToProto(c->input(3 + i), &partition_shape);
    if (partition_shape.unknown_rank()) {
      continue;
    }
    if (row_partition_types[i] == RowPartitionType::FIRST_DIM_SIZE) {
      if (partition_shape.dim_size() != 0) {
        return InvalidArgument("FIRST_DIM_SIZE must be a scalar.");
      }
    } else {
      if (partition_shape.dim_size() != 1) {
        return InvalidArgument("Row partition must be a vector.");
      }
    }
  }
  return tensorflow::Status::OK();
}

}  // namespace

Status RaggedTensorToSparseShapeFn(InferenceContext* c);
Status RaggedTensorToVariantShapeFn(InferenceContext* c);
Status RaggedTensorFromVariantShapeFn(InferenceContext* c);
tensorflow::Status RaggedTensorToTensorShapeFn(InferenceContext* c);

//==============================================================================
// Registered Ops
//==============================================================================

REGISTER_OP("RaggedTensorToSparse")
    .Input("rt_nested_splits: RAGGED_RANK * Tsplits")
    .Input("rt_dense_values: T")
    .Output("sparse_indices: int64")
    .Output("sparse_values: T")
    .Output("sparse_dense_shape: int64")
    .Attr("RAGGED_RANK: int >= 1")
    .Attr("T: type")
    .Attr("Tsplits: {int32, int64} = DT_INT64")
    .SetShapeFn(RaggedTensorToSparseShapeFn);

REGISTER_OP("RaggedTensorToVariant")
    .Input("rt_nested_splits: RAGGED_RANK * Tsplits")
    .Input("rt_dense_values: Tvalues")
    .Output("encoded_ragged: variant")
    .Attr("RAGGED_RANK: int >= 0")
    .Attr("Tvalues: type")
    .Attr("Tsplits: {int32, int64} = DT_INT64")
    .Attr("batched_input: bool")
    .SetShapeFn(RaggedTensorToVariantShapeFn);

REGISTER_OP("RaggedTensorFromVariant")
    .Input("encoded_ragged: variant")
    .Output("output_nested_splits: output_ragged_rank * Tsplits")
    .Output("output_dense_values: Tvalues")
    .Attr("input_ragged_rank: int >= -1")
    .Attr("output_ragged_rank: int >= 0")
    .Attr("Tvalues: type")
    .Attr("Tsplits: {int32, int64} = DT_INT64")
    .SetShapeFn(RaggedTensorFromVariantShapeFn);

REGISTER_OP("RaggedTensorToTensor")
    .Attr("T: type")
    .Attr("Tindex: {int64, int32}")
    .Attr("Tshape: {int64, int32}")
    .Attr("num_row_partition_tensors: int")
    .Attr("row_partition_types: list(string)")
    .Input("shape: Tshape")
    .Input("values: T")
    .Input("default_value: T")
    .Input("row_partition_tensors: num_row_partition_tensors * Tindex")
    .Output("result: T")
    .SetShapeFn(RaggedTensorToTensorShapeFn);

//==============================================================================
// Shape Functions
//==============================================================================

Status RaggedTensorToSparseShapeFn(InferenceContext* c) {
  int64 num_splits;
  TF_RETURN_IF_ERROR(c->GetAttr<int64>("RAGGED_RANK", &num_splits));
  // TODO(b/112274756): Allow ragged_rank to be 0.
  if (num_splits < 1) {
    return errors::InvalidArgument("Requires RAGGED_RANK>0");
  }
  ShapeHandle rt_dense_values = c->input(num_splits);
  TF_RETURN_IF_ERROR(c->WithRankAtLeast(rt_dense_values, 1, &rt_dense_values));

  // Check that all rt_nested_splits have rank 1.
  for (int64 i = 0; i < num_splits; ++i) {
    ShapeHandle splits = c->input(i);
    TF_RETURN_IF_ERROR(c->WithRank(splits, 1, &splits));
  }

  DimensionHandle dense_dims =
      c->RankKnown(rt_dense_values)
          ? c->MakeDim(c->Rank(rt_dense_values) + num_splits)
          : c->UnknownDim();
  DimensionHandle num_values = c->NumElements(rt_dense_values);

  c->set_output(0, c->Matrix(num_values, dense_dims));  // indices
  c->set_output(1, c->Vector(num_values));              // values
  c->set_output(2, c->Vector(dense_dims));              // dense_shape

  return Status::OK();
}

Status RaggedTensorToVariantShapeFn(InferenceContext* c) {
  int64 num_splits;
  TF_RETURN_IF_ERROR(c->GetAttr<int64>("RAGGED_RANK", &num_splits));
  bool batched;
  TF_RETURN_IF_ERROR(c->GetAttr<bool>("batched_input", &batched));
  shape_inference::ShapeHandle rt_dense_values = c->input(num_splits);
  TF_RETURN_IF_ERROR(c->WithRankAtLeast(rt_dense_values, 1, &rt_dense_values));
  for (int64 i = 0; i < num_splits; ++i) {
    shape_inference::ShapeHandle splits = c->input(i);
    TF_RETURN_IF_ERROR(c->WithRank(splits, 1, &splits));
  }
  if (batched) {
    auto num_first_splits = c->Dim(c->input(0), 0);
    shape_inference::DimensionHandle num_rows;
    TF_RETURN_IF_ERROR(c->Subtract(num_first_splits, 1, &num_rows));
    c->set_output(0, c->Vector(num_rows));
  } else {
    c->set_output(0, c->Scalar());
  }
  if (batched && num_splits == 0) {
    return errors::InvalidArgument(
        "ragged_rank=0 is not currently supported when batched_input=true.");
  }
  return Status::OK();
}

Status RaggedTensorFromVariantShapeFn(InferenceContext* c) {
  int64 input_ragged_rank;
  TF_RETURN_IF_ERROR(
      c->GetAttr<int64>("input_ragged_rank", &input_ragged_rank));
  int64 output_ragged_rank;
  TF_RETURN_IF_ERROR(
      c->GetAttr<int64>("output_ragged_rank", &output_ragged_rank));
  shape_inference::ShapeHandle encoded_ragged = c->input(0);
  if (c->RankKnown(encoded_ragged) && input_ragged_rank >= 0) {
    shape_inference::ShapeHandle unused;
    TF_RETURN_IF_ERROR(c->WithRank(
        encoded_ragged, output_ragged_rank - input_ragged_rank, &unused));
  }
  for (int64 i = 0; i < output_ragged_rank; i++) {
    c->set_output(i, c->UnknownShapeOfRank(1));
  }
  c->set_output(output_ragged_rank, c->UnknownShape());
  return Status::OK();
}

tensorflow::Status RaggedTensorToTensorShapeFn(InferenceContext* c) {
  TensorShapeProto shape;
  {
    ShapeHandle shape_handle;
    TF_RETURN_IF_ERROR(
        c->MakeShapeFromShapeTensorTreatScalarAsUnknownShape(0, &shape_handle));
    c->ShapeHandleToProto(shape_handle, &shape);
  }

  std::vector<RowPartitionType> row_partition_types;
  TF_RETURN_IF_ERROR(GetRowPartitionTypes(c, &row_partition_types));
  int ragged_rank = GetRaggedRank(row_partition_types);
  TF_RETURN_IF_ERROR(
      ValidateRowPartitionTypesAndShapes(row_partition_types, c));

  TensorShapeProto value_shape;
  c->ShapeHandleToProto(c->input(1), &value_shape);

  TensorShapeProto default_value_shape;
  c->ShapeHandleToProto(c->input(2), &default_value_shape);

  TF_RETURN_IF_ERROR(
      ValidateDefaultValueShape(default_value_shape, value_shape));

  // TODO(martinz): Theoretically, we could check the first dimension of
  // value_shape against the first dimension of the last row_partition_tensor
  // assuming it is a VALUE_ROWIDS type.
  // TODO(martinz): Although we normally don't know the first dimension of the
  // output, we could infer it from the first dimension of the first
  // row_partition_tensor if it is ROW_SPLITS type.
  // TODO(martinz): If the shape is provided, but the value_shape has missing
  // dimensions, we can check the default_value_shape against the shape.
  TensorShapeProto output_shape;
  TF_RETURN_IF_ERROR(CombineRaggedTensorToTensorShapes(
      ragged_rank, shape, value_shape, &output_shape));

  ShapeHandle output_shape_handle;
  TF_RETURN_IF_ERROR(
      c->MakeShapeFromShapeProto(output_shape, &output_shape_handle));
  c->set_output(0, output_shape_handle);
  return Status::OK();
}

}  // namespace tensorflow


text:
'''
Created on May 25, 2011

@author: bzcseife

This is a python ganglia plugin which monitors the status of an DIR service of the XtreemFS
filesystem. It is intend to run on the same host as the DIR and gathers information of the DIR per
SNMP. Therefore you have to configure your DIR to provide a SNMP Agent on this host.

'''
#TODO: If ganglia supports 64bit values uses 64bit integers instead of converting all 64 bit integers
#reported from the SNMP Agent to 32bit integers.

import random
from pysnmp.entity.rfc3413.oneliner import cmdgen
from pysnmp.entity.rfc3413.oneliner.cmdgen import UdpTransportTarget

descriptors = list()
Random_Max = 50
Constant_Value = 50

#Get the used memory of the JVM
def JvmUsedMem(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 1, 1, 0))
    if (errorStatus == False and errorIndication == None):

        return int(varBinds[0][1]/1024/1024)
    else:
        return 0
#Get the free memory of the JVM
def JvmFreeMem(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 1, 2, 0))

    if (errorStatus == False and errorIndication == None):
        return int(varBinds[0][1] / 1024 / 1024)
    else:
        return 0

#Get the number of client connections
def ClientConnections(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 1, 8, 0))

    if (errorStatus == False and errorIndication == None):
        return int(varBinds[0][1])
    else:
        return 0

#Get the number of pending requests
def PendingRequests(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 1, 9, 0))

    if (errorStatus == False and errorIndication == None):
        return int(varBinds[0][1])
    else:
        return 0

#Get the number of address mappings registered
def AddressMappingCount(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 2, 1, 0))

    if (errorStatus == False and errorIndication == None):
        return int(varBinds[0][1])
    else:
        return 0

#Get the number of services  registered
def ServiceCount(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 2, 2, 0))

    if (errorStatus == False and errorIndication == None):
        return int(varBinds[0][1])
    else:
        return 0

#get the status of the DIR
#OID: 1.3.6.1.4.1.38350.1.11.0
def Status(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 1, 11, 0))

    if (errorStatus == False and errorIndication == None):
        return str(varBinds[0][1])
    else:
        return "OFFLINE"

#get the UUID of the DIR
#OID: 1.3.6.1.4.1.38350.1.13.0
def Uuid(name):
    errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(authData,
                                                                                transportTarget,
                                                                                (1, 3, 6, 1, 4, 1, 38350, 1, 13, 0))

    if (errorStatus == False and errorIndication == None):
        return str(varBinds[0][1])
    else:
        return "Service not available"

def metric_init(params):

    global descriptors
    global Commmunity_String
    global Snmp_Port
    global authData
    global transportTarget

    if 'ComummunityString' in params:
        Community_String = params['CommunityString']
    else:
        Community_String = 'public'

    if 'Port' in params:
        Snmp_Port = int(params['Port'])
    if 'Host' in params:
        Snmp_Host = params['Host']

    authData = cmdgen.CommunityData('xtreemfs-agent', 'public')
    transportTarget = cmdgen.UdpTransportTarget((Snmp_Host, Snmp_Port), 1, 0)

    d0 = {'name': 'dir_jvm_used_mem',
        'call_back': JvmUsedMem,
        'time_max': 90,
        'value_type': 'uint',
        'units': 'Megabytes',
        'slope': 'both',
        'format': '%u',
        'description': 'The amount of memory the JVM uses currently.',
        'groups': 'dir'}

    d1 = {'name': 'dir_jvm_free_mem',
        'call_back': JvmFreeMem,
        'time_max': 90,
        'value_type': 'uint',
        'units': 'Megabytes',
        'slope': 'both',
        'format': '%u',
        'description': 'The amount of free memory the JVM can still use.',
        'groups': 'dir'}

    d2 = {'name': 'dir_client_connections',
        'call_back': ClientConnections,
        'time_max': 90,
        'value_type': 'uint',
        'units': 'clients',
        'slope': 'both',
        'format': '%u',
        'description': 'The number of active client connection this DIR has currently to handle.',
        'groups': 'dir'}

    d3 = {'name': 'dir_pending_requests',
        'call_back': PendingRequests,
        'time_max': 90,
        'value_type': 'uint',
        'units': 'pending requests',
        'slope': 'both',
        'format': '%u',
        'description': 'The number of pending requests this DIR has enqueued.',
        'groups': 'dir'}

    d4 = {'name': 'addr_mapping_count',
        'call_back': AddressMappingCount,
        'time_max': 90,
        #value_type: string | uint | float | double
        'value_type': 'uint',
        #units: unit of your metric
        'units': 'mappings',
        #slope: zero | positive | negative | both
            #This value maps to the data source types defined for RRDTool
            #If 'positive', RRD file generated will be of COUNTER type (calculating the rate of change)
            #If 'negative', ????
            #'both' will be of GAUGE type (no calculations are performed, graphing only the value reported)
            #If 'zero', the metric will appear in the "Time and String Metrics" or the "Constant Metrics" depending on the value_type of the m
        'slope': 'both',
        #format: format string of your metric
            #Must correspond to value_type otherwise value of your metric will be unpredictable (reference: http://docs.python.org/library/stdtypes.html#string-formatting)
        'format': '%u',
        #description: description of your metric
        'description': 'The number of address mapping registered at the DIR.',
        #groups (optional): groups your metric belongs to
        'groups': 'dir'}

    d5 = {'name': 'service_count',
        'call_back': ServiceCount,
        'time_max': 90,
        'value_type': 'uint',
        'units': 'services',
        'slope': 'both',
        'format': '%u',
        'description': 'The number of services registered at the DIR.',
        'groups': 'dir'}

    d6 = {'name': 'dir_status',
        'call_back': Status,
        'time_max': 90,
        'value_type': 'string',
        'units': '',
        'slope': 'zero',
        'format': '%s',
        'description': 'ONLINE if this DIR is running correctly, OFFLINE otherwise',
        'groups': 'dir'}

    d7 = {'name': 'dir_uuid',
        'call_back': Uuid,
        'time_max': 90,
        'value_type': 'string',
        'units': '',
        'slope': 'zero',
        'format': '%s',
        'description': 'UUID of the DIR running on this host',
        'groups': 'dir'}

    descriptors = [d0, d1, d2, d3, d4, d5, d6, d7]

    return descriptors

def metric_cleanup():
    '''Clean up the metric module.'''
    pass

#for debugging purpose
if __name__ == '__main__':
    params = {'CommunityString': 'public', 'Host': 'localhost', 'Port': 9001}
    metric_init(params)
    for d in descriptors:
        v = d['call_back'](d['name'])
        print 'value for %s is' % (d['name'])
        print v


text:
Class = require "lib.hump.class"
vector = require "lib.hump.vector"
PlayerBullet = require "entities.playerBullet"
Particle = require "game.particles.particle"
Rocket = require "game.projectiles.rocket"

RocketSalvo = Class {
	init = function(self, rank, state)
		self.state = state
		self.rank = rank
		self.cost = 120 - (self.rank * 20)
	end,
	heat = 0,
}

function RocketSalvo:update(dt)

end

function RocketSalvo:fire()
	local player = self.state.player

	if player.energy >= self.cost then
		player.energy = player.energy - self.cost

		local x,y = player.position:unpack()
		for i=-16,16,1 do
			local phi = (5*i) * (math.pi / 180)
			local spreadAimAt = vector(0,-1):rotated(phi)
			local bulletVel = spreadAimAt * 380
			local newBullet = Rocket(x+(spreadAimAt.x * 2), y+(spreadAimAt.y * 2), bulletVel.x, bulletVel.y, 2, self.state)
			self.state.manager:addEntity(newBullet, EntityTypes.PLAYER_BULLET)
		end

	end
end

return RocketSalvo


text:
package org.hildan.livedoc.core.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.hildan.livedoc.core.model.LivedocDefaultType;

/**
 * Specifies/overrides the expected type for the request body when calling the annotated method. It can also be used on
 * a parameter of a method in order to indicate that it represents the request body, but in that case the type cannot be
 * overridden.
 */
@Documented
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ApiRequestBodyType {

    /**
     * Specify this element if you need to use the {@code ApiRequestBodyType} annotation on the method declaration and
     * not on a parameter. This is to be able to document old style servlets' methods like doGet and doPost.
     * <p>
     * This element, even if specified, is not taken into account when the annotation is used on a parameter.
     */
    Class<?> value() default LivedocDefaultType.class;
}


text:
module feather.docs {

    import Template = feather.annotations.Template;
    import Bind = feather.observe.Bind;
    import Widget = feather.core.Widget;
    import Construct = feather.annotations.Construct;
    import On = feather.event.On

    @Construct({selector: '.hello-world'})
    class MyApplication extends Widget {

        @Bind() who = 'world'

        init(element: HTMLElement) {
            this.render('default')
        }

        @On({event: 'click', selector: 'button'})
        click() {
            this.who = 'everyone'
        }

        @Template('default')
        protected getBaseTemplate() {
            return `Hello {{who}}! <button>Change</button>`
        }
    }
}


text:
<?php

namespace Fab\Imagga\Tests;

use Mockery;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

abstract class TestCase extends PHPUnitTestCase
{
    public function tearDown()
    {
        Mockery::close();

        parent::tearDown();
    }
}


text:
import unittest
import unittest.mock

import functools

from g1.asyncs import kernels
from g1.operations.databases.bases import interfaces
from g1.operations.databases.servers import connections

# I am not sure why pylint cannot lint contextlib.asynccontextmanager
# correctly; let us disable this check for now.
#
# pylint: disable=not-async-context-manager

def synchronous(test_method):

    @kernels.with_kernel
    @functools.wraps(test_method)
    def wrapper(self):
        kernels.run(test_method(self))

    return wrapper

class ConnectionsTest(unittest.TestCase):

    def setUp(self):
        super().setUp()
        self.conn = unittest.mock.Mock()
        self.tx = self.conn.begin.return_value
        self.manager = connections.ConnectionManager(self.conn)
        unittest.mock.patch.multiple(
            connections,
            _WAIT_FOR_READER=0.01,
            _WAIT_FOR_WRITER=0.01,
        ).start()

    def tearDown(self):
        unittest.mock.patch.stopall()
        super().tearDown()

    def assert_manager(
        self,
        num_readers,
        tx_id,
        rollback_tx_ids,
        commit_tx_ids,
        timeout_tx_ids,
    ):
        self.assertEqual(self.manager._num_readers, num_readers)
        self.assertEqual(self.manager._tx_id, tx_id)
        self.assertEqual(tuple(self.manager._rollback_tx_ids), rollback_tx_ids)
        self.assertEqual(tuple(self.manager._commit_tx_ids), commit_tx_ids)
        self.assertEqual(tuple(self.manager._timeout_tx_ids), timeout_tx_ids)
        self.assertEqual(self.manager.tx_id, tx_id)

    @synchronous
    async def test_reading(self):
        self.assert_manager(0, 0, (), (), ())
        async with self.manager.reading() as conn_1:
            self.assert_manager(1, 0, (), (), ())
            self.assertIs(conn_1, self.conn)
            async with self.manager.reading() as conn_2:
                self.assert_manager(2, 0, (), (), ())
                self.assertIs(conn_2, self.conn)
                async with self.manager.reading() as conn_3:
                    self.assert_manager(3, 0, (), (), ())
                    self.assertIs(conn_3, self.conn)
                self.assert_manager(2, 0, (), (), ())
            self.assert_manager(1, 0, (), (), ())
        self.assert_manager(0, 0, (), (), ())
        self.conn.begin.assert_not_called()

    @synchronous
    async def test_reading_timeout(self):
        self.assert_manager(0, 0, (), (), ())
        async with self.manager.transacting():
            tx_id = self.manager.tx_id
            with self.assertRaises(interfaces.TransactionTimeoutError):
                async with self.manager.reading():
                    pass
        self.assert_manager(0, 0, (), (tx_id, ), ())
        self.conn.begin.assert_called_once()

    @synchronous
    async def test_writing(self):
        with self.assertRaises(interfaces.InvalidRequestError):
            async with self.manager.writing(0):
                pass
        with self.assertRaises(interfaces.TransactionNotFoundError):
            async with self.manager.writing(1):
                pass
        self.assert_manager(0, 0, (), (), ())
        async with self.manager.transacting():
            tx_id = self.manager.tx_id
            self.assert_manager(0, tx_id, (), (), ())
            async with self.manager.writing(tx_id) as conn:
                self.assert_manager(0, tx_id, (), (), ())
                self.assertIs(conn, self.conn)
            with self.assertRaises(interfaces.TransactionNotFoundError):
                async with self.manager.writing(tx_id + 1):
                    pass
        self.assert_manager(0, 0, (), (tx_id, ), ())
        self.conn.begin.assert_called_once()

    @synchronous
    async def test_transacting(self):
        self.assert_manager(0, 0, (), (), ())
        async with self.manager.transacting() as conn:
            tx_id = self.manager.tx_id
            self.assertNotEqual(tx_id, 0)
            self.assert_manager(0, tx_id, (), (), ())
            self.assertIs(conn, self.conn)
        self.assert_manager(0, 0, (), (tx_id, ), ())
        self.conn.begin.assert_called_once()

    @synchronous
    async def test_transacting_rollback(self):
        self.assert_manager(0, 0, (), (), ())
        with self.assertRaises(ValueError):
            async with self.manager.transacting():
                tx_id = self.manager.tx_id
                raise ValueError
        self.assert_manager(0, 0, (tx_id, ), (), ())
        self.conn.begin.assert_called_once()

    @synchronous
    async def test_transacting_timeout_on_reader(self):
        self.assert_manager(0, 0, (), (), ())
        async with self.manager.reading():
            with self.assertRaises(interfaces.TransactionTimeoutError):
                async with self.manager.transacting():
                    pass
        self.assert_manager(0, 0, (), (), ())
        self.conn.begin.assert_not_called()

    @synchronous
    async def test_transacting_timeout_on_writer(self):
        self.assert_manager(0, 0, (), (), ())
        async with self.manager.transacting():
            tx_id = self.manager.tx_id
            with self.assertRaises(interfaces.TransactionTimeoutError):
                async with self.manager.transacting():
                    pass
        self.assert_manager(0, 0, (), (tx_id, ), ())
        self.conn.begin.assert_called_once()

    @synchronous
    async def test_begin(self):
        with self.assertRaises(interfaces.InvalidRequestError):
            await self.manager.begin(0)
        self.assert_manager(0, 0, (), (), ())
        conn = await self.manager.begin(1)
        for _ in range(3):  # begin is idempotent.
            self.assertIs(await self.manager.begin(1), conn)
        self.assertIs(conn, self.conn)
        self.assert_manager(0, 1, (), (), ())
        with self.assertRaises(interfaces.TransactionTimeoutError):
            await self.manager.begin(2)
        self.conn.begin.assert_called_once()

    @synchronous
    async def test_end(self):
        with self.assertRaises(interfaces.InvalidRequestError):
            await self.manager.rollback(0)
        with self.assertRaises(interfaces.InvalidRequestError):
            await self.manager.commit(0)

        with self.assertRaises(interfaces.TransactionNotFoundError):
            await self.manager.rollback(1)
        with self.assertRaisesRegex(AssertionError, r'expect x != 0'):
            await self.manager.rollback_due_to_timeout()
        with self.assertRaises(interfaces.TransactionNotFoundError):
            await self.manager.commit(1)

        self.assert_manager(0, 0, (), (), ())
        await self.manager.begin(1)
        self.assert_manager(0, 1, (), (), ())
        with self.assertRaises(interfaces.TransactionNotFoundError):
            self.manager.rollback(999)
        with self.assertRaises(interfaces.TransactionNotFoundError):
            self.manager.commit(999)

        self.tx.rollback.assert_not_called()
        for _ in range(3):  # rollback is idempotent.
            self.manager.rollback(1)
        self.tx.rollback.assert_called_once()
        self.assert_manager(0, 0, (1, ), (), ())

        await self.manager.begin(2)
        self.tx.commit.assert_not_called()
        for _ in range(3):  # commit is idempotent.
            self.manager.commit(2)
        self.tx.commit.assert_called_once()
        self.assert_manager(0, 0, (1, ), (2, ), ())

        self.tx.rollback.reset_mock()
        await self.manager.begin(3)
        self.manager.rollback_due_to_timeout()
        self.tx.rollback.assert_called_once()
        self.assert_manager(0, 0, (1, ), (2, ), (3, ))

        await self.manager.begin(1)
        with self.assertRaises(interfaces.TransactionTimeoutError):
            async with self.manager.writing(3):
                pass
        with self.assertRaises(interfaces.TransactionNotFoundError):
            async with self.manager.writing(4):
                pass

if __name__ == '__main__':
    unittest.main()


text: NewDescription


text: add_test(fieldTest "/home/hryu/runos/build/test/oxm/fieldTest")


text:
package main

import (
	"crypto/aes"
	"encoding/hex"
	"fmt"
	"github.com/cheggaaa/pb"
	"github.com/google/skicka/gdrive"
	"io"
	"os"
	"path/filepath"
	"regexp"
	"sort"
	"strconv"
	"sync"
	"sync/atomic"
	"time"
)

func uploadUsage() {
	fmt.Printf("Usage: skicka upload [-ignore-times] [-encrypt] [-follow-symlinks <maxdepth>] local_path drive_path\n")
	fmt.Printf("Run \"skicka help\" for more detailed help text.\n")
}

func upload(args []string) int {
	ignoreTimes := false
	encrypt := false

	if len(args) < 2 {
		uploadUsage()
		return 1
	}

	i := 0
	maxSymlinkDepth := 0
	for ; i+2 < len(args); i++ {
		switch args[i] {
		case "-ignore-times":
			ignoreTimes = true
		case "-encrypt":
			encrypt = true
		case "-follow-symlinks":
			var err error
			maxSymlinkDepth, err = strconv.Atoi(args[i+1])
			if err != nil {
				printErrorAndExit(err)
			}
			i++
		default:
			uploadUsage()
			return 1
		}
	}
	trustTimes := !ignoreTimes

	localPath := filepath.Clean(args[i])
	drivePath := filepath.Clean(args[i+1])

	// Make sure localPath exists.
	if _, err := os.Stat(localPath); err != nil {
		printErrorAndExit(err)
	}

	f := gd.GetFiles(drivePath)
	switch len(f) {
	case 0:
		// It's fine if the target path doesn't exist, but its parent
		// directory must be there.
		p := filepath.Dir(drivePath)
		switch len(gd.GetFiles(p)) {
		case 0:
			printErrorAndExit(fmt.Errorf("%s: not found", p))
		case 1:
			// LGTM.
		default:
			printErrorAndExit(fmt.Errorf("%s: multiple files exist", p))
		}
	case 1:
		// LGTM.
	default:
		printErrorAndExit(fmt.Errorf("%s: multiple files exist", drivePath))
	}

	syncStartTime = time.Now()
	errs := syncHierarchyUp(localPath, drivePath, encrypt, trustTimes,
		maxSymlinkDepth)
	printFinalStats()

	return errs
}

// Representation of a local file that needs to be synced up to Drive.
type localToRemoteFileMapping struct {
	LocalPath     string
	DrivePath     string
	LocalFileInfo os.FileInfo
}

// Implement sort.Interface so that we can sort arrays of
// localToRemoteFileMapping by file size.
type localToRemoteBySize []localToRemoteFileMapping

func (l2r localToRemoteBySize) Len() int      { return len(l2r) }
func (l2r localToRemoteBySize) Swap(i, j int) { l2r[i], l2r[j] = l2r[j], l2r[i] }
func (l2r localToRemoteBySize) Less(i, j int) bool {
	return l2r[i].LocalFileInfo.Size() < l2r[j].LocalFileInfo.Size()
}

// Given a file on the local disk, synchronize it with Google Drive: if the
// corresponding file doesn't exist on Drive, it's created; if it exists
// but has different contents, the contents are updated.  The Unix
// permissions and file modification time on Drive are also updated
// appropriately.
func syncFileUp(localPath string, stat os.FileInfo, drivePath string, encrypt bool,
	pb *pb.ProgressBar) error {
	debug.Printf("syncFileUp: %s -> %s", localPath, drivePath)

	// Get the *drive.File for the folder to create the new file in.
	// This folder should definitely exist at this point, since we
	// create all folders needed before starting to upload files.
	parentFolder, err := gd.GetFile(filepath.Dir(drivePath))
	if err != nil {
		panic(fmt.Sprintf("%s: get parent directory: %s", filepath.Dir(drivePath), err))
	}

	baseName := filepath.Base(drivePath)
	var driveFile *gdrive.File

	if stat.IsDir() {
		// We only get here if the folder doesn't exist at all on Drive; if
		// it already exists, we updated the metadata earlier (in
		// fileNeedsUpload) and don't go through this path.
		var proplist []gdrive.Property
		proplist = append(proplist, gdrive.Property{Key: "Permissions",
			Value: fmt.Sprintf("%#o", stat.Mode()&os.ModePerm)})
		driveFile, err = gd.CreateFolder(baseName, parentFolder, normalizeModTime(stat.ModTime()),
			proplist)
		checkFatalError(err, fmt.Sprintf("%s: create folder", drivePath))

		if pb != nil {
			pb.Increment()
		}
		atomic.AddInt64(&stats.UploadBytes, stat.Size())
		verbose.Printf("Created Google Drive folder %s", drivePath)
	} else {
		// We're uploading a file.  Create an empty file on Google Drive if
		// it doesn't already exist.
		if driveFile, err = gd.GetFile(drivePath); err == gdrive.ErrNotExist {
			debug.Printf("%s doesn't exist on Drive. Creating", drivePath)
			var proplist []gdrive.Property
			if encrypt {
				// Compute a unique IV for the file.
				iv := getRandomBytes(aes.BlockSize)
				ivhex := hex.EncodeToString(iv)
				proplist = append(proplist, gdrive.Property{Key: "IV", Value: ivhex})
			}
			proplist = append(proplist, gdrive.Property{Key: "Permissions",
				Value: fmt.Sprintf("%#o", stat.Mode()&os.ModePerm)})
			// We explicitly set the modification time of the file to the
			// start of the Unix epoch, so that if the upload fails
			// partway through, then we won't later be confused about which
			// file is the correct one from having local and Drive copies
			// with the same time but different contents.
			driveFile, err = gd.CreateFile(baseName, parentFolder, time.Unix(0, 0),
				proplist)

			if err != nil {
				return err
			}
		}

		// And now upload the contents of the file, either overwriting the
		// contents of the existing file, or adding contents to the
		// just-created file.
		if err = uploadFileContents(localPath, driveFile, encrypt, pb); err != nil {
			return err
		}
	}

	verbose.Printf("Updated local %s -> Google Drive %s", localPath, drivePath)

	// Only update the modification time on Google Drive to match the local
	// modification time after the upload has finished successfully.
	return gd.UpdateModificationTime(driveFile, normalizeModTime(stat.ModTime()))
}

// uploadFileContents does its best to upload the local file stored at
// localPath to the given *drive.File on Google Drive.  (It assumes that
// the *drive.File has already been created.)
func uploadFileContents(localPath string, driveFile *gdrive.File, encrypt bool,
	pb *pb.ProgressBar) error {
	var iv []byte
	var err error
	if encrypt {
		iv, err = getInitializationVector(driveFile)
		if err != nil {
			return fmt.Errorf("unable to get IV: %v", err)
		}
	}

	for try := 0; ; try++ {
		contentsReader, length, err :=
			getFileContentsReaderForUpload(localPath, encrypt, iv)
		if contentsReader != nil {
			defer contentsReader.Close()
		}
		if err != nil {
			return err
		}

		// Keep track of how many bytes are uploaded in case we fail
		// part-way through and need to roll back the progress bar.
		countingReader := &byteCountingReader{R: contentsReader}

		// Also tee reads to the progress bar as they are done so that it
		// stays in sync with how much data has been transmitted.
		var uploadReader io.Reader
		if pb != nil {
			uploadReader = io.TeeReader(countingReader, pb)
		} else {
			uploadReader = countingReader
		}

		if length >= resumableUploadMinSize {
			err = gd.UploadFileContentsResumable(driveFile, uploadReader, length)
		} else {
			err = gd.UploadFileContents(driveFile, uploadReader, length, try)
		}
		atomic.AddInt64(&stats.DiskReadBytes, countingReader.bytesRead)

		if err == nil {
			// Success!
			atomic.AddInt64(&stats.DriveFilesUpdated, 1)
			atomic.AddInt64(&stats.UploadBytes, length)
			return nil
		}

		// The "progress" made so far on this file should be rolled back;
		// if we don't do this, when retries happen, we end up going over
		// 100% progress...
		if pb != nil {
			pb.Add64(-countingReader.bytesRead)
		}

		if re, ok := err.(gdrive.RetryHTTPTransmitError); ok && try < 5 {
			debug.Printf("%s: got retry http error--retrying: %s",
				localPath, re.Error())
		} else {
			debug.Printf("%s: giving up due to error: %v", localPath, err)
			// We're giving up on this file, so subtract its length from
			// what the progress bar is expecting.
			if pb != nil {
				pb.Total -= length
			}
			return err
		}
	}
}

// Synchronize a local directory hierarchy with Google Drive.
// localPath is the file or directory to start with, driveRoot is
// the directory into which the file/directory will be sent
func syncHierarchyUp(localPath string, driveRoot string, encrypt bool, trustTimes bool,
	maxSymlinkDepth int) int {
	if encrypt && key == nil {
		key = decryptEncryptionKey()
	}

	fileMappings, nUploadErrors := compileUploadFileTree(localPath, driveRoot,
		encrypt, trustTimes, maxSymlinkDepth)
	if len(fileMappings) == 0 {
		message("No files to be uploaded.")
		return 0
	}

	nBytesToUpload := int64(0)
	for _, info := range fileMappings {
		if !info.LocalFileInfo.IsDir() {
			nBytesToUpload += info.LocalFileInfo.Size()
		}
	}

	// Given the list of files to sync, first find all of the directories and
	// then either get or create a Drive folder for each one.
	directoryMappingMap := make(map[string]localToRemoteFileMapping)
	var directoryNames []string
	for _, localfile := range fileMappings {
		if localfile.LocalFileInfo.IsDir() {
			directoryNames = append(directoryNames, localfile.DrivePath)
			directoryMappingMap[localfile.DrivePath] = localfile
		}
	}

	// Now sort the directories by name, which ensures that the parent of each
	// directory has already been created if we need to create its children.
	sort.Strings(directoryNames)

	if len(directoryNames) > 0 {
		// Actually create/update the directories.
		var dirProgressBar *pb.ProgressBar
		if !quiet {
			dirProgressBar = pb.New(len(directoryNames))
			dirProgressBar.Output = os.Stderr
			dirProgressBar.Prefix("Directories: ")
			dirProgressBar.Start()
		}

		// Sync each of the directories, which serves to create any missing ones.
		for _, dirName := range directoryNames {
			file := directoryMappingMap[dirName]
			err := syncFileUp(file.LocalPath, file.LocalFileInfo, file.DrivePath,
				encrypt, dirProgressBar)
			if err != nil {
				// Errors creating directories are basically unrecoverable,
				// as they'll prevent us from later uploading any files in
				// them.
				printErrorAndExit(err)
			}
		}
		if dirProgressBar != nil {
			dirProgressBar.Finish()
		}
	}

	var fileProgressBar *pb.ProgressBar
	if !quiet {
		fileProgressBar = pb.New64(nBytesToUpload).SetUnits(pb.U_BYTES)
		fileProgressBar.Output = os.Stderr
		fileProgressBar.Prefix("Files: ")
		fileProgressBar.Start()
	}

	// Sort the files by size, small to large.
	sort.Sort(localToRemoteBySize(fileMappings))

	// The two indices uploadFrontIndex and uploadBackIndex point to the
	// range of elements in the fileMappings array that haven't yet been
	// uploaded.
	uploadFrontIndex := 0
	uploadBackIndex := len(fileMappings) - 1

	// First, upload any large files that will use the resumable upload
	// protocol using a single thread; more threads here doesn't generally
	// help improve bandwidth utilizaiton and seems to make rate limit
	// errors from the Drive API more frequent...
	for ; uploadBackIndex >= 0; uploadBackIndex-- {
		if fileMappings[uploadBackIndex].LocalFileInfo.Size() < resumableUploadMinSize {
			break
		}

		fm := fileMappings[uploadBackIndex]
		if fm.LocalFileInfo.IsDir() {
			continue
		}

		if err := syncFileUp(fm.LocalPath, fm.LocalFileInfo, fm.DrivePath, encrypt,
			fileProgressBar); err != nil {
			addErrorAndPrintMessage(&nUploadErrors, fm.LocalPath, err)
		}
	}

	// Upload worker threads send a value over this channel when
	// they're done; the code that launches them waits for all of them
	// to do so before returning.
	doneChan := make(chan int, nWorkers)

	// Now that multiple threads are running, we need a mutex to protect
	// access to uploadFrontIndex and uploadBackIndex.
	var uploadIndexMutex sync.Mutex

	// All but one of the upload threads will grab files to upload starting
	// from the begining of the fileMappings array, thus doing the smallest
	// files first; one thread starts from the back of the array, doing the
	// largest files first.  In this way, the large files help saturate the
	// available upload bandwidth and hide the fixed overhead of creating
	// the smaller files.
	uploadWorker := func(startFromFront bool) {
		for {
			uploadIndexMutex.Lock()
			if uploadFrontIndex > uploadBackIndex {
				// All files have been uploaded.
				debug.Printf("All files uploaded [%d,%d]; exiting",
					uploadFrontIndex, uploadBackIndex)
				uploadIndexMutex.Unlock()
				doneChan <- 1
				break
			}

			// Get the index into fileMappings for the next file this
			// worker should upload.
			var index int
			if startFromFront {
				index = uploadFrontIndex
				uploadFrontIndex++
			} else {
				index = uploadBackIndex
				uploadBackIndex--
			}
			uploadIndexMutex.Unlock()

			fm := fileMappings[index]
			if fm.LocalFileInfo.IsDir() {
				// Directories have already been taken care of.
				continue
			}

			err := syncFileUp(fm.LocalPath, fm.LocalFileInfo, fm.DrivePath, encrypt,
				fileProgressBar)
			if err != nil {
				atomic.AddInt32(&nUploadErrors, 1)
				fmt.Fprintf(os.Stderr, "\nskicka: %s: %v\n", fm.LocalPath, err)
			}
		}
	}

	// Launch the workers.
	for i := 0; i < nWorkers; i++ {
		// All workers except the first one start from the front of
		// the array.
		go uploadWorker(i != 0)
	}

	// Wait for all of the workers to finish.
	for i := 0; i < nWorkers; i++ {
		<-doneChan
	}
	if fileProgressBar != nil {
		fileProgressBar.Finish()
	}

	if nUploadErrors > 0 {
		fmt.Fprintf(os.Stderr, "skicka: %d files not uploaded due to errors. "+
			"This may be a transient failure; try uploading again.\n", nUploadErrors)
	}
	return int(nUploadErrors)
}

func isSymlink(stat os.FileInfo) bool {
	return (stat.Mode() & os.ModeSymlink) != 0
}

// Determine if the local file needs to be uploaded to Google Drive.
// Starts with the efficient checks that may be able to let us quickly
// determine one way or the other before going to the more expensive ones.
func fileNeedsUpload(localPath, drivePath string, stat os.FileInfo,
	encrypt, trustTimes bool) (bool, error) {
	// Don't upload if the filename matches one of the regular expressions
	// of files to ignore.
	for _, re := range config.Upload.Ignored_Regexp {
		match, err := regexp.MatchString(re, localPath)
		if match == true {
			verbose.Printf("skicka: %s: ignoring file, which "+
				"matches regexp \"%s\".\n", localPath, re)
			return false, nil
		}
		if err != nil {
			return false, err
		}
	}

	if isSymlink(stat) {
		// This shouldn't happen.
		return false, fmt.Errorf("%s: unexpected symlink", localPath)
	}

	// See if the file exists: if not, then we definitely need to do the
	// upload.
	driveFile, err := gd.GetFile(drivePath)
	if err == gdrive.ErrNotExist {
		debug.Printf("drive file %s doesn't exist -> needs upload", drivePath)
		return true, nil
	} else if err == gdrive.ErrMultipleFiles {
		// If there are multiple files with this name on Drive (as is
		// allowed), then we're going to ignore this file, since it's non
		// obvious what the right thing to do it.
		fmt.Fprintf(os.Stderr, "skicka: %s: multiple files/folders with this name exist "+
			"in Google Drive. Skipping all files in this hierarchy.\n",
			drivePath)
		return false, nil
	} else if err != nil {
		// Some other error.
		return false, err
	}

	// At this point, we know that a file with the corresponding pathname
	// exists on Drive.

	// Error out if there's a mismatch on file-ness and folder-ness between
	// local and Drive.
	if stat.IsDir() && !driveFile.IsFolder() {
		return false, fmt.Errorf("%s: is directory, but %s on Drive is a regular file",
			localPath, drivePath)
	}
	if !stat.IsDir() && driveFile.IsFolder() {
		return false, fmt.Errorf("%s: is regular file, but %s on Drive is a folder",
			localPath, drivePath)
	}

	// With that check out of the way, take the opportunity to make sure
	// the file has all of the properties that we expect.
	if err := createMissingProperties(driveFile, stat.Mode(), encrypt); err != nil {
		debug.Printf("%s: error creating properties: %s", driveFile, err)
		return false, err
	}

	// Go ahead and update the file's permissions if they've changed.
	bitsString := fmt.Sprintf("%#o", stat.Mode()&os.ModePerm)
	debug.Printf("%s: updating permissions to %s", drivePath, bitsString)
	if err := gd.UpdateProperty(driveFile, "Permissions", bitsString); err != nil {
		debug.Printf("%s: error updating permissions properties: %s", driveFile, err)
		return false, err
	}

	// If it's a directory, once it's created and the permissions and times
	// are updated (if needed), we're all done.
	if stat.IsDir() {
		debug.Printf("%s: updating modification time to %s", drivePath, normalizeModTime(stat.ModTime()))
		return false, gd.UpdateModificationTime(driveFile, normalizeModTime(stat.ModTime()))
	}

	// Compare file sizes.
	localSize, driveSize := stat.Size(), driveFile.FileSize
	if encrypt {
		// We store a copy of the initialization vector at the start of
		// the file stored in Google Drive; account for this when
		// comparing the file sizes.
		driveSize -= aes.BlockSize
	}
	sizeMatches := localSize == driveSize
	if sizeMatches == false {
		// File sizes differ: we need to upload the local file.
		debug.Printf("size mismatch; adding file %s to upload list", localPath)
		return true, nil
	}

	// Compare modification times.
	driveTime := normalizeModTime(driveFile.ModTime)
	localTime := normalizeModTime(stat.ModTime())
	debug.Printf("localTime: %v, driveTime: %v", localTime, driveTime)
	timeMatches := localTime.Equal(driveTime)
	if timeMatches && trustTimes {
		debug.Printf("size and time match; skipping upload of %s", localPath)
		return false, nil
	}

	// Either the modification times differ or they're the same but we
	// don't trust them.  Therefore, we'll now go through the work of
	// computing MD5 checksums of file contents to make a final decision.
	var iv []byte
	if encrypt {
		iv, err = getInitializationVector(driveFile)
		if err != nil {
			return false, fmt.Errorf("unable to get IV: %v", err)
		}
	}

	// Check if the saved MD5 on Drive is the same when it's recomputed locally
	md5local, err := localFileMD5Contents(localPath, encrypt, iv)
	if err != nil {
		return false, err
	}
	if md5local != driveFile.Md5 {
		// The contents of the local file and the remote file differ.

		if timeMatches {
			// We're running with -ignore-times, the modification times
			// matched, but the file contents were different. This is both
			// surprising and disturbing; it specifically suggests that
			// either the file contents were modified in one of the two
			// places without the file's modification time being updated,
			// or that there was file corruption of some sort. We'll be
			// conservative and not clobber the Drive file in case it was
			// the latter.
			return false, fmt.Errorf("%s: has different contents versus Google "+
				"Drive file %s, but doesn't have a newer timestamp. **Not updating"+
				"the file on Drive**. Run 'touch' to update the file"+
				"modification time and re-run skicka if you do want to"+
				"update the file.", localPath, drivePath)
		}

		return true, nil
	}

	// The timestamp of the local file is different, but the checksums
	// match, so just update the modified time on Drive and don't upload
	// the file contents.
	debug.Printf("%s: updating modification time (#2) to %s", drivePath, localTime)
	return false, gd.UpdateModificationTime(driveFile, localTime)
}

// Given a path to a file and its FileInfo, follow symlinks starting at the
// path up to *maxSymlinkDepth. Returns an error if the maximum depth is
// reached and it is at symlink; otherwise returns the resolved path and
// FileInfo.  Decrements the counter in *maxSymlinkDepth according to the
// number of symlinks followed.
func resolveSymlinks(path string, stat os.FileInfo, maxSymlinkDepth *int) (string, os.FileInfo, error) {
	origPath := path
	for *maxSymlinkDepth > 0 && isSymlink(stat) {
		var err error
		path, err = filepath.EvalSymlinks(path)
		if err != nil {
			return path, stat, err
		}

		*maxSymlinkDepth -= 1

		stat, err = os.Stat(path)
		if err != nil {
			return path, stat, err
		}
	}

	if isSymlink(stat) {
		return path, stat, fmt.Errorf("%s: maximum symlink depth reached", origPath)
	}
	return path, stat, nil
}

// Walk the local filesystem starting at localPath; for each file
// encountered, determine if the file needs to be uploaded. If so, an entry
// is added to the returned localToRemoteFileMapping array.
func walkPathForUploads(localPath, drivePath string, encrypt,
	trustTimes bool, maxSymlinkDepth int) ([]localToRemoteFileMapping, int32) {
	var fileMappings []localToRemoteFileMapping
	nErrs := int32(0)

	pathWalkFunc := func(path string, stat os.FileInfo, patherr error) error {
		path = filepath.Clean(path)
		if patherr != nil {
			debug.Printf("%s: %v", path, patherr)
			return nil
		}

		// Get the file's path relative to the base directory we're
		// uploading from.
		relPath, err := filepath.Rel(localPath, path)
		if err != nil {
			return err
		}
		drivePath := filepath.Join(drivePath, relPath)

		if isSymlink(stat) {
			// Follow symlinks up to the depth allowed.
			maxDepth := maxSymlinkDepth
			path, stat, err = resolveSymlinks(path, stat, &maxDepth)
			if err != nil {
				fmt.Fprintf(os.Stderr, "skicka: %s\n", err)
				nErrs++
				return nil
			}

			// We reached a non-symlink. Make a recursive call to
			// walkPathForUploads in case we reached a directory; note that
			// the maxDepth passed in accounts for the number of links we
			// followed to get to this point.
			mappings, ne := walkPathForUploads(path, drivePath, encrypt,
				trustTimes, maxDepth)
			fileMappings = append(fileMappings, mappings...)
			nErrs += ne
			return nil
		}

		if stat.IsDir() == false && encrypt == true {
			drivePath += encryptionSuffix
		}

		upload, err := fileNeedsUpload(path, drivePath, stat, encrypt, trustTimes)
		if err != nil {
			fmt.Fprintf(os.Stderr, "skicka: %s\n", err)
			nErrs++
		} else if upload {
			fileMappings = append(fileMappings,
				localToRemoteFileMapping{path, drivePath, stat})
		}

		// Always return nil: we don't want to stop walking the
		// hierarchy just because we hit an error deciding if one file
		// needs to be uploaded.
		return nil
	}

	if err := filepath.Walk(localPath, pathWalkFunc); err != nil {
		fmt.Fprintf(os.Stderr, "skicka: %s\n", err)
		nErrs++
	}
	return fileMappings, nErrs
}

func compileUploadFileTree(localPath, drivePath string,
	encrypt, trustTimes bool, maxSymlinkDepth int) ([]localToRemoteFileMapping, int32) {
	// Walk the local directory hierarchy starting at 'localPath' and build
	// an array of files that may need to be synchronized.
	nUploadErrors := int32(0)

	// If we're just uploading a single file, some of the details are
	// different...
	if stat, err := os.Stat(localPath); err == nil && stat.IsDir() == false {
		driveFile, err := gd.GetFile(drivePath)
		switch err {
		case nil:
			if driveFile.IsFolder() {
				// The local path is for a file and the Drive path is for a
				// folder; update the drive path to end with the base of the
				// local filename.
				drivePath = filepath.Join(drivePath, filepath.Base(localPath))
			}
		case gdrive.ErrNotExist:
			// This is fine.
		default:
			fmt.Fprintf(os.Stderr, "skicka: %s: %s\n", drivePath, err)
			return nil, 1
		}

		if encrypt {
			drivePath += encryptionSuffix
		}

		if isSymlink(stat) {
			localPath, stat, err = resolveSymlinks(localPath, stat, &maxSymlinkDepth)
			if err != nil {
				verbose.Printf("skicka: %s", err)
				nUploadErrors++
				return nil, nUploadErrors
			}
		}

		var fileMappings []localToRemoteFileMapping
		upload, err := fileNeedsUpload(localPath, drivePath, stat,
			encrypt, trustTimes)
		if err != nil {
			fmt.Fprintf(os.Stderr, "skicka: %s", err)
			nUploadErrors++
		} else if upload {
			fileMappings = append(fileMappings,
				localToRemoteFileMapping{localPath, drivePath, stat})
		}
		return fileMappings, nUploadErrors
	}

	message("Getting list of local files... ")
	fileMappings, nErrs := walkPathForUploads(localPath, drivePath, encrypt,
		trustTimes, maxSymlinkDepth)
	nUploadErrors += nErrs
	message("Done.")

	return fileMappings, nUploadErrors
}

// If we didn't shut down cleanly before, there may be files that
// don't have the various properties we expect. Check for that now
// and patch things up as needed.
func createMissingProperties(f *gdrive.File, mode os.FileMode, encrypt bool) error {
	if !f.IsFolder() && encrypt {
		if _, err := f.GetProperty("IV"); err != nil {
			if f.FileSize == 0 {
				// Compute a unique IV for the file.
				iv := getRandomBytes(aes.BlockSize)
				ivhex := hex.EncodeToString(iv)

				debug.Printf("Creating IV property for file %s, "+
					"which doesn't have one.", f.Path)
				err := gd.AddProperty("IV", ivhex, f)
				if err != nil {
					return err
				}
			} else {
				// This is state of affairs really shouldn't ever happen, but
				// if somehow it does, it's important that we catch it: the
				// file is missing the IV property, but has some
				// contents. Presumably the IV is at the start of the file
				// contents and we could initialize the property from that
				// here, but any successfully created file should already have
				// the property, so we'll just error out, since it's not clear
				// what's going on here...
				return fmt.Errorf("encrypted file on Drive is missing" +
					"IV property, but has non-zero length. Can't create the IV " +
					"property without examining file contents.")
			}
		}
	}
	if _, err := f.GetProperty("Permissions"); err != nil {
		debug.Printf("Creating Permissions property for file %s, "+
			"which doesn't have one.", f.Path)
		err := gd.AddProperty("Permissions", fmt.Sprintf("%#o", mode&os.ModePerm), f)
		if err != nil {
			return err
		}
	}
	return nil
}


text:
package com.hazelcast.simulator.protocol.registry;

import com.hazelcast.simulator.agent.workerjvm.WorkerJvmSettings;
import com.hazelcast.simulator.protocol.core.AddressLevel;
import com.hazelcast.simulator.protocol.core.SimulatorAddress;
import com.hazelcast.simulator.test.TestCase;
import com.hazelcast.simulator.test.TestSuite;
import com.hazelcast.simulator.utils.CommandLineExitException;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicInteger;

import static java.util.Collections.synchronizedList;
import static java.util.Collections.unmodifiableList;

/**
 * Keeps track of all Simulator components which are running.
 */
public class ComponentRegistry {

    private final AtomicInteger agentIndex = new AtomicInteger();
    private final AtomicInteger testIndex = new AtomicInteger();

    private final List<AgentData> agents = synchronizedList(new ArrayList<AgentData>());
    private final List<WorkerData> workers = synchronizedList(new ArrayList<WorkerData>());
    private final ConcurrentMap<String, TestData> tests = new ConcurrentHashMap<String, TestData>();

    public void addAgent(String publicAddress, String privateAddress) {
        AgentData agentData = new AgentData(agentIndex.incrementAndGet(), publicAddress, privateAddress);
        agents.add(agentData);
    }

    public void removeAgent(AgentData agentData) {
        agents.remove(agentData);
    }

    public int agentCount() {
        return agents.size();
    }

    public List<AgentData> getAgents() {
        return unmodifiableList(agents);
    }

    public List<AgentData> getAgents(int count) {
        int size = agents.size();
        return unmodifiableList(agents.subList(size - count, size));
    }

    public AgentData getFirstAgent() {
        if (agents.size() == 0) {
            throw new CommandLineExitException("No agents running!");
        }
        return agents.get(0);
    }

    public synchronized void addWorkers(SimulatorAddress parentAddress, List<WorkerJvmSettings> settingsList) {
        for (WorkerJvmSettings settings : settingsList) {
            WorkerData workerData = new WorkerData(parentAddress, settings);
            workers.add(workerData);
        }
    }

    public synchronized void removeWorker(SimulatorAddress workerAddress) {
        for (WorkerData workerData : workers) {
            if (workerData.getAddress().equals(workerAddress)) {
                workers.remove(workerData);
                break;
            }
        }
    }

    public synchronized void removeWorker(WorkerData workerData) {
        workers.remove(workerData);
    }

    public int workerCount() {
        return workers.size();
    }

    public boolean hasClientWorkers() {
        for (WorkerData workerData : workers) {
            if (!workerData.isMemberWorker()) {
                return true;
            }
        }
        return false;
    }

    public List<WorkerData> getWorkers() {
        return unmodifiableList(workers);
    }

    public WorkerData getFirstWorker() {
        if (workers.size() == 0) {
            throw new CommandLineExitException("No workers running!");
        }
        return workers.get(0);
    }

    public Set<SimulatorAddress> getMissingWorkers(Set<SimulatorAddress> finishedWorkers) {
        Set<SimulatorAddress> missingWorkers = new HashSet<SimulatorAddress>();
        for (WorkerData worker : workers) {
            SimulatorAddress workerAddress = worker.getAddress();
            if (!finishedWorkers.contains(workerAddress)) {
                missingWorkers.add(workerAddress);
            }
        }
        return missingWorkers;
    }

    public synchronized void addTests(TestSuite testSuite) {
        for (TestCase testCase : testSuite.getTestCaseList()) {
            int addressIndex = testIndex.incrementAndGet();
            SimulatorAddress testAddress = new SimulatorAddress(AddressLevel.TEST, 0, 0, addressIndex);
            TestData testData = new TestData(addressIndex, testAddress, testCase);
            tests.put(testCase.getId(), testData);
        }
    }

    public void removeTests() {
        tests.clear();
    }

    public Collection<TestData> getTests() {
        return tests.values();
    }

    public TestData getTest(String testId) {
        return tests.get(testId);
    }
}


text:
language = {
	[0] = "Wegpunktpfad %s geladen.\n",
	[1] = "R\129ckkehrpfad %s geladen.\n",
	[2] = "Bildschirmabgriff gespeichert in: %s\n",
	[3] = "Gestorben. Spieler wird wiederbelebt...\n",
	[4] = "Wir kehren zum Wegpunkt zur\129ck.\n",
	[5] = "Ignoriere Ziel (%s): Anti-KS\n",
	[6] = "Wir gehen zum Wegpunkt #%d, (%d, %d) %s\n",
	[7] = "R\129ckkehrpfad absolviert. Wiederhole normale Wegpunkte.\n",
	[8] = "Bewegung zu Wegpunkt fehlgeschlagen!\n",
	[9] = "Versuche Spieler frei zu bekommen ... an Position %d,%d. Versuch #%d von maximal %d Versuchen.\n",
	[10] = "MACRO: Benutze Heiltrank %s/%s (%d%%): %s (Anz %s)\n",
	[11] = "MACRO: Benutze Manatrank %s/%s (%d%%): %s (Anz %s)\n",
	[12] = "R\129ckkehrpfad ist n\132her als normale Wegepunkte. Beginne mit dem R\129ckkehrpfad!\n",
	[13] = "Wir gehen zum R\129ckkehrpfad-Wegpunkt #%d, (%d, %d) %s\n",
	[14] = "Wir befinden uns im Kampf. Stehenbleiben und auf den Angreifer warten.\n",
	[15] = "Wegepunkt #%d ist n\132her als #1. Wir starten daher mit Wegepunkt #%d.\n",
	[16] = "Keine (benutzbaren) Manatr\132nke mehr in den Taschenpl\132tzen 1 bis %d vorhanden.\n",
	[17] = "Keine (benutzbaren) Heiltr\132nke mehr in den Taschenpl\132tzen 1 bis %d vorhanden.\n",
	[18] = "NOTIZ: Fehler beim Gegenstand (%s~=%s); hole neue Infos (dauert nur kurz).\n",
	[19] = "Ziel verloren.\n",
	[20] = "Aus\129bung abgeschlossen\n",
	[21] = "Dr\129cke %s: %s",
	[22] = "Wir greifen den Gegner \'%s\' an.\n",
	[23] = "Gegnerische HP ver\132ndert\n",
	[24] = "Zu nah. Nehme Abstand.\n",
	[25] = "Bewegung zu | Soll Entfernung: %d | Ist: %d\n",
	[26] = "Drehung dauert zu lange... breche ab\n",
	[27] = "Kampf beendet. %d %s get\148tet. (Kampf #%d / Laufzeit %d Minuten)\n",
	[28] = "Stoppe Wegpunkt: Ziel gefunden.\n",
	[29] = "Distanzabbruch.\n",
	[30] = "Ziel nicht angreifbar: %s\n",
	[31] = "Dr\129cke %s: Pl\129ndere toten Mob. Entfernung %d.\n",
	[32] = "Toter Mob zu weit entfernt, nicht zu pl\129ndern.\n",
	[33] = "L\148sche Ziel.\n",
	[34] = "Aggro Wartezeit \129berschritten.\n",
	[35] = "Wir haben Aggro und warten auf unser Ziel.\n",
	[36] = "Im Kampf bevor wir unser Ziel angegriffen haben. Wir brechen unser aktuelles Ziel ab: %s\n",
	[37] = "Neues Ziel \'%s\' ausgew\132hlt. Entfernung %d\n",
	[38] = "Pausiere f\129r %s Sekunden um Mana und Gesundheit zu regenerien.\n",
	[39] = "Wir werden angegriffen. Pausieren wird abgebrochen.\n",

	[40] = "Spieleradresse ge\132ndert: 0x%X\n",
	[41] = "Speicherlesung schlug fehl",
	[42] = "RoM Fenstergr\148\225e ist %dx%d, obere linke Ecke bei %d,%d\n",
	[43] = "Das Spiel hat sich ge\132ndert.\n Sie sollten \'rom/update.lua\' ausf\129hren!\n\n",
	[44] = "Versuche die \'playerAddress\' zu lesen\n",
	[45] = "Mehrere RoM Fenster gefunden. Holen Sie das Fenster in den Vordergrund, dem Sie den Bot zuordnen m\148chten und dr\129cken Sie %s.\n",
	[46] = "Bot pausiert. (%s) dr\129cken um weiterzumachen, (CTRL+L) beendet den Bot, (CTRL+C) schlie\225t das Micromacro Fenster\n",
	[47] = "RoM Fenster nicht gefunden! RoM mu\225 vor dem Bot gestartet werden!",
	[48] = "Fehler beim Lesen der Speicheradresse f\129r \'%s\'. Das Spiel wurde ge\132ndert!!! Bitte \'rom/bot.lua update\' ausf\129hren UND die neue Version des RoM Bot installieren!",

	[50] = "%s  Automatisches Ausloggen\n",
	[51] = "Herunterfahren des Systems.\n",
	[52] = "Verbindung zum Spiele Fenster verloren (Client abgestr\129rzt oder geschlossen?). Skript bitte neu starten.",
	[53] = "Laufzeit %d gr\148\225er als maximale Laufzeit %d. Wir loggen uns aus.\n",
	[54] = "Anzahl Tode %d gr\148\225er als maximal erlaubte Tode %d. Wir loggen uns aus.\n",
	[55] = "Anzahl Freikommversuche %d gr\148\225er als maximal erlaubte Anzahl %d.\n",
	[56] = "Wir wurden vom Spiel getrennt.\n",

	[60] = "Unbekanntes Tag %s im Profil %s.xml. Bitte \129berpr\129fen Sie Ihr Profil!\n",
	[61] = "Fehlerhafte Option \'%s\' f\129r bot.lua\n\nSyntax: rom/bot.lua [profile:name] [path:name] [retpath:name]\n\nprofile:profname\tBenutze Profil \'profname.xml\'\npath:pathname\t\tBenutze Wegepunkt Datei \'pathname.xml\'\nretpath:retname\t\tBenutze R\129ckkehrpfad \'retname.xml\'\n",
	[62] = "Fehler beim Lesen der Spracheinstellung des Spiels. Haben Sie Ihr leeres MACRO im Spiel richtig zugeordnet? Bitte den Bot und gegebenenfalls das Spiel nochmal starten.",

	[70] = "Pausieren nach %s Sekunden beendet.\n",
	[71] = "Pausiere f\129r %s Sekunden.\n",

	[75] = "Fehler in Ihrem Profil: onLevelUp Fehler: %s",
	[76] = "Fertigkeitsstufe im Sammeln nicht hoch genug.",
	[77] = "Ung\129ltige Auswahl genutzt in 'player:getCraftLevel'",
	[78] = "Sammeln abgebrochen. Es wurde Aggro gezogen.\n",
	[79] = "Es wurden keine Ressourcen in der N\132he gefunden.\n",
	[80] = "N\132her herangehen.\n",
	[81] = "Unerwartete Unterbrechung beim Erntebeginn. Wir versuchen es nochmal.\n",
	[82] = "=>   * abgebrochen *\n",
	[83] = "Wir machen keinen Schaden und brechen daher ab ...\n",
	[84] = "Zu viele Versuche, dem Ziele n\132her zu kommen. Wir brechen ab.\n",
	[85] = "Fehler im Profile bei der Zeitpunktverarbeiten: onLeaveCombat error %s",
	[86] = "nicht Weiterlaufen: noch ein Ziel gefunden\n",
	[87] = "Wir ignorieren das Ziel %s.\n",
	[88] = "Der Runes of Magic Prozess wurde erfolgreich geschlossen.\n",
	[89] = "Der Bot geht um %s in den Schlafmodus. Dr\129cke %s um weiterzumachen.\n",
	[90] = "Aufgewacht, nachdem %s gedr\129ckt wurde um %s.\n",
	[91] = "Schlafmodus um %s beendet. Wir haben Aggro.\n",
	[92] = "Mausklick %s an Position %d,%d bei %dx%d (neu berechnet von %d,%d bei Aufl\148sung %dx%d).\n",
	[93] = "Mausklick %s an Position %d,%d.\n",

	[95] = "Wir haben %s gefunden und werden es abbauen.\n",
	[96] = "Wir versuchen den Gegner mit einer Fernkampff\132higkeit an uns heranzuziehen.\n",
	[97] = "Heranziehen des Gegners beendet. Der Gegner ist im Nahkampfbereich.\n",
	[98] = "Heranziehen des Gegners nach 3 Sekunden Wartezeit beendet.\n",
	[99] = "Heranziehen des Gegners beendet. Der Gegner scheint sich nicht zu bewegen.\n",
	[100] = "Wir haben uns nicht zum Pl\129ndern bewegt!? Festgewurzelt? Option \'zum Bewegen klicken\' aktiviert?\n",
	[101] = "Aus technischen Gr\129nden k\148nnen wir den Charakter-/Profilname \'%s\' nicht benutzen. Bitte benutzen Sie statt dessen den Profilnamen  \'%s.xml\' oder starten Sie den Bot mit einem erzwungenen Profile: \'rom\\bot.lua profile:xyz\'\nDer Bot wurde wegen den vorgenannten Fehlern beendet.",
	[102] = "Wir k\148nnen das Profile \'%s.xml\' nicht finden. Bitte legen Sie ein entsprechendes Profil im Ordner \'rom\\profiles\' an oder starten Sie den Bot mit einem erzwungenen Profile: \'rom\\bot.lua profile:xyz\'\nDer Bot wurde wegen den vorgenannten Fehlern beendet.",
	[103] = "Wenn Sie die automatische Wiederbelebung benutzen m\148chten, m\129ssen Sie die Option \'RES_AUTOMATIC_AFTER_DEATH = \"true\"\' in Ihrem Profil setzen.\n",
	[104] = "Wir werden die automatische Wiederbelebung in 10 Sekunden versuchen.\n",
	[105] = "Wir versuchen die Wiederbelebung am Platz des Todes ...\n",
	[106] = "Wir versuchen uns am Auferstehungspunkt wiederzubeleben ...\n",
	[107] = "Wir versuchen das Ingame Makro zur Wiederbelebung zu benutzen ...\n",
	[108] = "Sie sind noch immer tot. Es gibt ein Problem mit der automatischen Wiederbelebung. Haben Sie Ingame den ersten Makro Platz mit einem Dummy Makro belegt und dieses der Taste %s zugeordnet?\n",
	[109] = "Sie sind %s mal von maximal %s Toden/automatischer Wiederbelebung gestorben.\n",
	[111] = "Sie haben keinen R\129cklaufpfad angegeben!!! Wir benutzen daher die normale Wegepunktedatei \'%s\' . Bitte pr\129fen Sie das.\n",
	[112] = "Wir benutzen die normale Wegepunktdatei \'%s\' nach der automatischen Wiederbelebung.\n",
	[113] = "Wegepunkt Typ TRAVEL: wir stoppen und k\132mpfen nicht.\n",
	[114] = "Keine Wegepunkte in der Wegepunkt-Datei.",
	[115] = "Fehler: Die Taste f\129r \'%s\' ist leer!\n",
	[116] = "Fehler: Die Taste \'%s\' f\129r \'%s\' ist ung\129ltig!\n",
	[117] = "Fehler: Die Modifikatortaste \'%s\' f\129r \'%s\' ist ung\129ltig (VK_SHIFT, VK_ALT, VK_CONTROL)!\n",
	[118] = "Aus technischen Gr\129nden werden im Moment keine Modifikatortasten wie CTRL/ALT/SHIFT unterst\129tzt. Bitte \132ndern Sie die Einstellungen f\129r die Taste %s-%s f\129r \'%s\'\n",
	[119] = "Sie k\148nnen die Funktion player:target_NPC() nicht nutzen. Das ist nur ein Warnhinweis!\n",
	[120] = "Bitte \129berpr\129fen Sie Ihre Einstellungen!",
	[121] = "Fehler: Die Taste \'%s%s\' ist zweimal zugeordnet: f\129r \'%s\' und f\129r \'%s\'.\n",
	[122] = "settings.xml Fehler: %s hat keine g\129ltige Tastenzuordnung!",
	[123] = "Wir lesen die Tastatureinstellungen aus der Datei bindings.txt von %s anstelle der Einstellungen aus der Datei settings.xml.\n",
	[124] = "Fehler: Die Tastenzuordnung f\129r \'%s\' fehlt. Bitte ordnen Sie im Spiel eine g\129ltige Taste zu.",
	[125] = "Ihr Tastatureinstellungen f\129r \'%s\' in settings.xml passen nicht zu den Ingame Tastatureinstellungen.\nBitte \129berpr\129fen Sie Ihre Einstellungen!",
	[126] = "Fehler: Globale Taste nicht gesetzt: ",
	[127] = "Profil Fehler: Bitte der Funktion %s eine g\129ltige Taste im Profil \'%s.xml\' zuordnen.",
	[128] = "Die Optionen \'mana\', \'rage\', \'energy\', \'focus\', \'range\', \'cooldown\', \'minrange\', \'type\', \'target\' and \'casttime\' sein ung\129ltig bei der F\132higkeit \'%s\' im Profil \'%s.xml\'. Bitte l\148schen Sie die Option und starten Sie den Bot neu!\n",
	[129] = "Die Option \'modifier\' bei der F\132higkeit \'%s\' im Profil \'%s.xml\' wird zur Zeit nicht unterst\129tzt. Bitte l\148schen Sie die Option und starten Sie den Bot neu!\n",
	[130] = "Sie haben eine \'leere\' F\132higkeit im Profil \'%s.xml\'. Bitte l\148schen oder berichtigen Sie diese Einstellung!\n",
	[131] = "Sie haben eine falsche Einstellunge f\129r die Option inbattle=\'%s\' bei der F\132higkeit %s im Profil \'%s.xml\'. Bitte l\148schen oder berichtigen Sie diese Einstellung!\n",
	[132] = "Sie haben eine falsche Einstellunge f\129r die Option pullonly=\'%s\' bei der F\132higkeit %s im Profil \'%s.xml\'. Nur \'true\' ist erlaubt. Bitte l\148schen oder berichtigen Sie diese Einstellung!\n",
	[133] = "target_NPC(): Bitte geben Sie den Namen des NPC an, der gesucht werden soll.\n",
	[134] = "Aus technischen Gr\129nden k\148nnen im Moment keine Modifikationstasten wie CTRL/ALT/SHIFT benutzt werden. Bitte \132ndern Sie die Tastaturzuprdnung %s-%s f\129r TARGET_FRIEND.\n",
	[135] = "Wir versuchen den NPC %s zu finden: ",
	[136] = "\nDer NPC \'%s\' wurde erfolgreich ausgew\132hlt. Wir \148ffnen das Dialogfenster.\n",
	[137] = "\nWir k\148nnen den NPC %s nicht finden!\n",
	[138] = "Es wurde gar kein NPC gefunden! Haben Sie ingame die Taste %s der Funktion \'n\132chsten Freund ausw\132hlen\' zugeordnet?\n",
	[139] = "Das RoM Fenster muss im Vordergrund sein um die Mausklick Funktion zu benutzen. Wir k\148nnen die Funktion im Moment nicht benutzen!\n",
	[140] = "Bitte \129berpr\129fen Sie Ihre Einstellungen in der Datei settings.xml und in ihrem Profil!\n",
	[141] = "Bitte \129berpr\129fen Sie Ihre Einstellungen: Ingame -> System -> Tastenbelegung und in Ihrem Profil\n",
	[142] = "Wir k\148nnen die Wegepunktdatei \'%s\' nicht finden. Bitte legen Sie eine g\129ltige Wegepunktdatei im Ordner \'waypoints\' an oder geben Sie den richtigen Dateinamen an.\nDer Bot wird wegen dem vorgenannten Fehler beendet.",
	[143] = "Wir k\148nnen den R\129ckkehrpfad \'%s\' nicht finden. Bitte legen Sie eine g\129ltige R\129ckkehrpfad-Datei im Ordner \'waypoints\' an oder geben Sie den richtigen Dateinamen an.\nDer Bot wird wegen dem vorgenannten Fehler beendet.",
	[144] = "Wegepunktdateien in %s:\n",
	[145] = "Welche Wegpunktdatei m\148chten Sie nutzen? Geben Sie die Nummer ein und dr\129cken Sie %s > ",
	[146] = "Sie haben ausgew\132hlt: %s\n",
	[147] = "Falsche Auswahl. Bitte pr\129fen Sie Ihre Eingabe und w\132hlen Sie erneut!\n",
	[148] = "Wir gehen nach diesem Kampf in den Schlafmodus / sobald als m\148glich.\n",
	[149] = "Sie sind gestorben... Sorry.\n",

	[150] = "Fehler beim Kompilieren und Lua Code auszuf\129hren beim Wegpunkt #%d. Bitte pr\129fen Sie den Lua Code an diesem Wegepunkt.",
	[151] = "Fehler beim Kompilieren und Lua Code auszuf\129hren beim Event %s im Charakter-Profil. Bitte \129berpr\129fen Sie den Lua Code zu dem angegebenen Event in Ihrem Profile.",
	[152] = "Fehler beim kompilieren und ausfuhren des LUA codes. Fehler in dem onLoad Event in der Wegpunkt Datei.",
	[153] = "Wegepunkt-Datei \'%s\' konnte nicht gefunden werden. Bitte w\132hlen Sie eine aus der Liste aus.\n",
	[154] = "Sie m\129ssen sowohl \'reqbuffname\' als auch \'reqbufftarget\' definieren f\129r Skill %s in Ihrem Profil \'%s.xml\'. Bitte korrigieren oder l\148schen Sie beide!\n",
	[155] = "Sie m\129ssen sowohl \'nobuffname\' als auch \'nobufftarget\' definieren f\129r Skill %s in Ihrem Profil \'%s.xml\'. Bitte korrigieren oder l\148schen Sie beide!\n",
	[156] = "Ung\129ltige Auswahl f\129r reqbufftarget=\'%s\' beim Skill %s in Ihrem Profil \'%s.xml\'. Nur \'player\' oder \'target\' ist m\148glich. Bitte korrigieren oder l\148schen Sie diese Option!\n",
	[157] = "Ung\129ltige Auswahl f\129r nobufftarget=\'%s\' beim Skill %s in Ihrem Profil \'%s.xml\'. Nur \'player\' oder \'target\' ist m\148glich. Bitte korrigieren oder l\148schen Sie diese Option!\n",
	[158] = "Es gibt keine Skill-ID 'id' f\129r Skill %s in der Skill Datenbank. Bitte tragen Sie eine g\129ltige ID oder Hotkey in Ihrem Profil ein.",

	[159] = "Bewege in die Item-Shop-Tasche: %s.\n",
	[160] = "Skript pausiert, bis Sie sich selbst wiederbeleben. Dr\129cken Sie %s wenn Sie weitermachen m\148chten.\n",
	[161] = "Sie m\129ssen entweder eine Wegepunktdatei oder einen R\129ckkehrpfad angeben, um die Funktion load_paths() zu nutzen. Es wurden keine Pfade geladen!\n",
	[162] = "R\129ckkehrpfaddatei mit dem Defaultnamen %s gefunden.\n",
	[163] = "Es wurde keine R\129ckkehrpfaddatei mit dem Defaultnamen %s gefunden.\n",
	[164] = "Wir kommen von einem R\129ckkehrpfade. Daher werden wir auch jetzt den R\129ckkehrpfad %s benutzen.\n",
	[165] = "Wir benutzen nun die normale Wegepunktdatei %s.\n",
	[166] = "Bitte neue Profiloption <hotkey name=\"MACRO\" key=\"VK_7\" /> zur automatischen Wiederbelebung setzen.\n",
	[167] = "Tastenzuordnungen kommen aus Datei %s:",
	[168] = "Wir wandern in einem Radius von %d umher.\n",
	[169] = "Dr\129cke %s: RoMScript ausf\129hren \"%s\".\n",
	[170] = "Level %d Geschenkbeutel \148ffnen bzw. ausr\129sten.\n",
	[171] = "\148ffne/anziehen Gegenstand: %s\n",
	[172] = "Die Option \'%s\' wurde von \'%s\' auf \'%s\' ge\132ndert.\n",
	[173] = "Unbekannte Option \'%s\'. Wir k\148nnen den Wert nicht ver\132ndern. Bitte Einstellungen pr\129fen.\n",
	[174] = "Gegenstand wurde nicht gefunden: %s\n",
	[175] = "Sturobold",
	[176] = "Fernkampff\132higkeit gefunden: %s\n",
	[177] = "Aktueller Kampf abgebrochen.\n",
	[178] = "Looten wegen Aggro \129bersprungen.\n",
	[179] = "Maximale Reichweite der Fernkampff\132higkeiten ist kleiner als die Einstellung COMBAT_DISTANCE=%d. Bitte die COMBAT_DISTANCE Einstellung reduzieren.\n",
	[180] = " =>   * Cast gescheitert *\n",
	[181] = "target_Object(): Bitte gebe dem Objekt einen Namen fur diese Funktion.\n",
	[182] = "Diese Aktion kann nicht ausgefuhrt werden, Gegenstand befindet sich in einem gesperrtem Rucksackfach",
	[183] = "Das ingamefunctions Addon (igf) ist nicht installiert oder muss geupdated werden. Sie k\148nnen nicht in-game Ereignisse \129berwachen solange Sie das nicht gemacht haben.",
	[184] = "Unbekannter Profil Skill \'%s\'. Der Skill ist nicht in ihrem Profil definiert. Bitte pr\129fen Sie Ihre Einstellungen.\n",
	[185] = "Wir die Option \'%s\' ge\132ndert f\129r den Skill \'%s\' von \'%s\' zu \'%s\'.\n",
	[186] = "Lade Profil %s.xml\n",

	[200] = "Keine Fernkampf F\132higkeit im Profil angegeben. Option COMBAT_RANGED_PULL wurde ausgeschaltet.\n",

	-- createpath.lua
	[500] = "Unter welchem Namen m\148chten Sie die Wegepunktdatei speichern (ohne .xml)?\nName> ",
	[501] = "RoM Wegepunktdateien erstellen\n",
	[502] = "Hotkeys:\n  (%s)\tErzeuge Wegepunkt (an der Spielerposition)\n",
	[503] = "  (%s)\tErzeuge Ressourcen Wegepunkt (an der Spielerposition)\n",
	[504] = "  (%s)\tErzeuge Wegepunkt NPC Auswahl (Dialog)\n",
	[505] = "  (%s)\tWegepunktdatei speichern und beenden\n",
	[506] = "  (%s)\tWegepunktdatei speichern und neu starten\n",
	[507] = "Geben Sie die Nummer der Option an, die sie ausw\132hlen m\148chten > ",
	[508] = "Gespeichert [#%3d] %s, gehen Sie zum n\132chsten Wegepunkt.\n",
	[509] = "  (%s)\tErzeuge Wegepunkt H\132ndler (reparieren, einkaufen)\n",
	[510] = "  (%s)\t\'mouseclickL()\' Befehl einf\129gen\n",
	[511] = "%d: Wegepunkt hinzugef\129gt\n",
	[512] = "%d: Ressourcenpunkt hinzugef\129gt\n",
	[513] = "Kaufmann %s ist Ihr neuer H\132ndler!\n",
	[514] = "Dialog mit NPC %s wird ge\148ffnet.\n",
	[515] = "\'mouseclickL()\' Befehl eingef\129gt (%d,%d).\n",
	[516] = "\'ChoiceOptionByName(%s)\' Befehl einf\129gt.\n",
	[517] = "  (%s)\t\'ChoiceOption()\' Befehl einf\129gen\n",
	[518] = "  (%s)   Reset des Wegpunkt und Neustart\n",
	[519] = "  (%s)\tF\129ge lua Code Befehl ein. \n",
	[520] = "F\129gen Sie gew\129nschten Code am letzten Wegepunkt ein. > ",
	[521] = "Code \'%s\' eingef\129gt.\n",
	[522] = "  (%s)\tF\129gen Sie Zielobjekt Befehl ein.\n",
	[523] = "F\129gen Sie \'player:target_object(\"%s\") Befehl ein.\n",

	[600] = "RoM Bot %s [%s] (%d,%d) - %d exp/min, %d Minuten bis Stufe nach oben",

	[900] = "Wir benutzen eine neue Macro Funktion um mit dem Spiel zu kommunizieren.\n",
	[901] = "Bitte den neuen Hotkey:   <hotkey name=\"MACRO\" key=\"VK_0\" />\n",
	[902] = "im Profil anlegen. Die folgenden alten Hotkeys k\148nnen gel\148scht werden:\n",
	[903] = "RES_MACRO, LOGOUT_MACRO, HP_POTION, MP_POTION, ATTACK.\n",
	[904] = "Legen Sie im Spiel auf dem ERSTEN Makroplatz ein leeres Makro an und ordnen Sie dieses dem MACRO Hotkey \'%s\' zu.\n",
	[905] = "Bitte berichtigen Sie das Profile \'%s\' und starten Sie den Bot nochmal.\n",
	[906] = "Die Makro\129bergabe an das Spiel scheint nicht zu funktionieren.\n",

	-- Inventory.lua
	[1000] = "Aktualisierung Inventar (Taschenplatz 1 bis %d)...\n",
	[1001] = "Einkaufen",
	[1002] = "N\132chste Inventar Aktualisierung in sp\132testens %d Sekunden.\n",

	[1004] = "Das Addon ingamefunctions ist nicht installiert! Wir k\148nnen keine Gegenst\132nde verkaufen! Bitte igf installieren (den Ordner 'ingamefunctions' aus 'rom/devtools' in die RoM Installation in '/interface/addons' kopieren) oder l\148schen Sie die Optionen INV_AUTOSELL_NOSELL_DURA und INV_AUTOSELL_STATS_NOSELL aus Ihrem Profil.\n",
	[1005] = "AutoSell gescheitert: Deine Client Sprache wird nicht unterstutzt.",
	[1006] = "Der 'ingamefunctions' Ordner im Spieleordner 'interface/addons', ist veraltet. Die aktuelle Version ist %d, Sie haben %d. Um zu updaten, rechtsklicken Sie den 'interface/addons/ingamefunctions' Ordner und w\132hlen Sie 'SVN Update' oder kopieren Sie den 'ingamefunctions' Ordner von 'rom/devtools' in den Spieleordner 'interface/addons'. Danach das Spiel neustarten.\n",
};


text:
import React, { SFC, useCallback } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import Adsenses from '../../../Adsense/Adsenses';
import { RootState } from '../../ducks';
import { actions } from '../../ducks/Sheet';
import LampTd from './LampTd';

const SheetList: SFC = (props) => {
  const dispatch = useDispatch();
  const $$sheetList = useSelector(
    (state: RootState) => state.$$sheet.sheetList,
  );
  const $$abilities = useSelector(
    (state: RootState) => state.$$sheet.abilities,
  );
  const $$scoreList = useSelector(
    (state: RootState) => state.$$sheet.scoreList,
  );
  const $$currentUser = useSelector(
    (state: RootState) => state.$$meta.currentUser,
  );
  const $$user = useSelector((state: RootState) => state.$$sheet.user);
  const mobile = useSelector((state: RootState) =>
    state.$$meta.env.mobileView(),
  );
  const type = useSelector((state: RootState) => state.$$sheet.type);

  const owner = useCallback(() => {
    if ($$currentUser === undefined) {
      return false;
    }
    return $$currentUser.is($$user);
  }, [$$currentUser]);

  const updateLamp = useCallback(
    (sheetId?: number) => (e: React.ChangeEvent<HTMLSelectElement>) => {
      if ($$currentUser === undefined || sheetId === undefined) {
        return;
      }
      const { iidxid } = $$currentUser;
      const state = parseInt(e.target.value, 10);
      dispatch(actions.updateScoreRequested({ iidxid, sheetId, state }));
    },
    [$$currentUser],
  );

  const handleSheetClick = useCallback(
    (sheetId?: number) => (e: React.MouseEvent) => {
      e.preventDefault();
      const { iidxid } = $$user;
      if (iidxid === undefined || sheetId === undefined) {
        return;
      }
      dispatch(actions.getModalRequested({ iidxid, sheetId }));
    },
    [],
  );

  const handleToggleDisplaySelect = useCallback(
    () => dispatch(actions.toggleDisplaySelect()),
    [],
  );

  const renderSheet = () => {
    const dom: JSX.Element[] = [];
    $$abilities.forEach((value, key) => {
      dom.push(
        <tr key={`ability-${type}-${key}`}>

            {value}

,
      );
      $$sheetList
        .chunk($$sheetList.whereAbility(key, type))
        .forEach((sheets) => {
          const tdDom = sheets
            .toList()
            .map((sheet) => {
              if (sheet === undefined) {
                return;
              }
              const score = $$scoreList.findBySheetId(sheet.id);
              return (
                <LampTd
                  key={`sheet-${sheet.id}`}
                  {...{
                    owner: owner(),
                    updateLamp,
                    handleSheetClick,
                    sheet,
                    score,
                    width: 150,
                    height: 50,
                  }}
                />
              );
            })
            .toArray();

          const ids = sheets.map((sheet) => sheet?.id).join('-');
          dom.push(<tr key={`sheet-${ids}`}>{tdDom}
);
        });
    });
    return dom;
  };

  const renderMobile = () => {
    const dom: JSX.Element[] = [];
    $$abilities.forEach((value, key) => {
      dom.push(
        <tr key={`ability-${type}-${key}`} className="levelttl">

            {value}

,
      );
      $$sheetList.whereAbility(key, type).forEach((sheet) => {
        if (sheet === undefined) {
          return;
        }
        const score = $$scoreList.findBySheetId(sheet.id);
        dom.push(
          <tr key={`sheet-${sheet.id}`} className="lamp">
            <LampTd
              {...{
                owner: owner(),
                updateLamp,
                handleSheetClick,
                sheet,
                score,
              }}
            />

,
        );
      });
    });
    return dom;
  };

  return (
    <>
      <Adsenses slot={1} />
      {owner() ? (
        <button
          onClick={handleToggleDisplaySelect}
          className="button is-primary"
          style={{ marginBottom: '10px' }}
        >
          編集ボタン表示切替
        </button>
      ) : null}

{mobile ? renderMobile() : renderSheet()}

    </>
  );
};

export default SheetList;


text:
    Ready to Join the Conversation?

    Dig into the

    Mozilla Media Newsgroup


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Dashboard</title>
    <link rel="stylesheet" href="libs/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="libs/bootstrap/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" href="libs/font-awesome/css/font-awesome.min.css" />
    <link rel="stylesheet" href="override.css" />
    <link rel="stylesheet" href="common.css" />
    <link rel="stylesheet" href="dashboard.css" />
    <link rel="stylesheet" href="components.css" />

          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">

          </button>
          Forkgen v0.0.0 Alpha

                  Take a Tour

                  API Explorer

                  Documentation

                  Github Home Page

                  Gitbook Page

                  Release Page

                  Milestones

                  Issues Page

                  Open Pull Requests

                  About Forkgen

Dashboard

Status

              <form class="navbar-form" role="search">

                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Search Filter"> </button>

Action

Another action

Something else here

Separated link

                  <input type="text" class="form-control" placeholder="Search" aria-label="...">

                    <button class="btn btn-default" type="button" title="Execute Search"></button>

              </form>

                Statistics

                Database

                Find

                Backup

                Deployment

                API

                Settings

Projects

Protocore

Repository: github.com/hegdeashwin/Protocore

Tags:
                                  HTML
                                  CSS
                                  JavaScript
                                  Python
                                  PHP
                                  Ruby

Nebula

Repository: github.com/hegdeashwin/Nebula

Tags:
                                  HTML
                                  CSS
                                  JavaScript
                                  Ruby

Boneloop

Repository: github.com/hegdeashwin/Nebula

Tags:
                                  HTML
                                  CSS
                                  JavaScript
                                  Ruby

                                  «

1

2

3

4

5

                                  »

Activities

                          Panel content

Database

Find

Backup

Deployment

API

                          Cras justo odio

                        Dapibus ac facilisis in
                        Morbi leo risus
                        Porta ac consectetur ac
                        Vestibulum at eros

                            <button type="button" class="btn btn-sm btn-default" title="Setting"></button>
                            <button type="button" class="btn btn-sm btn-default" title="Help"></button>
                            <button type="button" class="btn btn-sm btn-default" title="Minimize"></button>

Panel title

                          Panel content

Panel footer

Panel title

                              Panel content

Panel footer

Panel title

                              Panel content

Panel footer

                  Copyright © 2015 Ashwin Hegde | Contributions, The MIT License (MIT)


text:
package com.geekhome.entity.service;

import java.util.Date;
import java.util.List;
import java.util.Random;

import javax.persistence.EntityManager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.geekhome.common.utils.PasswordUtil;
import com.geekhome.entity.User;
import com.geekhome.entity.dao.UserDao;

@Service
public class UserService {

	@Autowired
	private UserDao userDao;
	@Autowired
    EntityManager entityManager;

	public User saveUser(User user) {

		if (user.getId() != null) {
			List<User> list = userDao.findUserByIdNotAndUserName(user.getId(), user.getUserName());
			if (list.isEmpty()) {
				User m_user = userDao.findOne(user.getId());
				user.setCreateTime(m_user.getCreateTime());
				user.setState(m_user.getState());
				user.setSex(m_user.getSex());
				user.setPassword(m_user.getPassword());
				user.setUpdateTime(new Date());
				user.setIntegralId(user.getIntegralId());
				user.setIntegral(user.getIntegral());
				user.setSignUpState(user.getSignUpState());
				userDao.save(user);
				return user;
			} else {
				return new User();// 已存在相同名称
			}
		} else {
			User m_user = userDao.findUserByUserName(user.getUserName());
			if (m_user == null) {
				String password = PasswordUtil.createCustomPwd(user.getPassword(), user.getUserName() + User.SALT);
				user.setPassword(password);
				user.setCreateTime(new Date());
				Random random = new Random();
				int result = random.nextInt(44);
				user.setHeadImgUrl(result + ".png");
				user.setState(User.USER_STATE_DEFAULT);
				user.setBrief("用户很懒,什么都没说明....");
				user.setSex(User.USER_SEX_DEFAULT);
				userDao.save(user);
				return user;
			} else {
				return new User();// 已存在相同名称
			}
		}
	}

	/**
	 * 通过用户名和邮箱验证用户是否存在
	 * @param user 传入的用户名和邮箱
	 * @return
	 */
	public User verifyByNameAndEmail(User user){
	    User us = userDao.findUserByUserNameAndEmail(user.getUserName(), user.getEmail());
	    if(us != null) {
	        return us;
	    }else {
	       return new User();
	    }
	}

	/**
	 * 修改用户密码
	 * @return
	 */
	public Integer modifyPersonPwd(String userName , String pwd ) {
	    Integer num = userDao.modifyPersonPwd(userName, pwd);
	    return num;
	}

	/**
	 * 通过用户名密码登录
	 * @return
	 */
	@SuppressWarnings("unchecked")
    public User findUserByUserNameAndPassword(String userName, String password) {
	    StringBuilder strb = new StringBuilder();
	    strb.append("SELECT U.ID id , U.USER_NAME userName , U.SEX sex , U.BIRTHDAY birthday , U.EMAIL email , U.PHONE phone")
	    .append(", U.PASSWORD password , U.BRIEF brief , U.HEAD_IMG_URL headImgUrl , U.STATE state , U.CREATE_TIME createTime , U.UPDATE_TIME updateTime")
	    .append(", U.COMPANY company , U.ADDRESS address , U.GIT_HUB_URL gitHubUrl , U.WEB_SITE_URL webSiteUrl , U.INTEGRAL_ID integralId , I.INTEGRAL integral")
	    .append(",I.STATE signUpState FROM USER U LEFT JOIN INTEGRAL I ON U.ID = I.USER_ID WHERE U.USER_NAME=:userName AND U.PASSWORD=:password");
	    System.out.println(strb.toString());
	    List<User> users = entityManager.createNativeQuery(strb.toString() , "findUserByUserNameAndPassword").setParameter("userName", userName)
	        .setParameter("password", password).getResultList();
	    return users.get(0);
	}

}


text:
FROM alpine:latest

LABEL \
    maintainer="Morgan AUCHEDE <morgan.auchede@gmail.com>"

RUN set -e -u -x \
\
    # Install packages
\
    && apk add --no-cache --no-progress --virtual BUILD_DEPS bzip2 curl \
    && apk add --no-cache --no-progress apache2-utils bash ca-certificates tzdata \
\
    # Install rclone
\
    && curl --location --output /tmp/rclone.zip "https://github.com/ncw/rclone/releases/download/v1.53.1/rclone-v1.53.1-linux-amd64.zip" \
    && ( cd /tmp && unzip /tmp/rclone.zip ) \
    && mv /tmp/rclone-v1.53.1-linux-amd64/rclone /usr/local/bin/rclone \
    && chmod +x /usr/local/bin/rclone \
\
    # Install rest-server
\
    && curl --location --output /tmp/rest-server.gz "https://github.com/restic/rest-server/releases/download/v0.9.7/rest-server-0.9.7-linux-amd64.gz" \
    && gunzip /tmp/rest-server.gz \
    && mv /tmp/rest-server /usr/local/bin/rest-server \
    && chmod +x /usr/local/bin/rest-server \
\
    # Install restic
\
    && curl --location --output /tmp/restic.bz2 "https://github.com/restic/restic/releases/download/v0.10.0/restic_0.10.0_linux_amd64.bz2" \
    && bunzip2 /tmp/restic.bz2 \
    && mv /tmp/restic /usr/local/bin/restic \
    && chmod +x /usr/local/bin/restic \
\
    # Clean
\
    && apk del --no-progress BUILD_DEPS \
    && rm -f -r /tmp/*


text:
struct PP_NetAddress_Private;

namespace ppapi {
namespace host {
class PpapiHost;
}
}

namespace content {

class BrowserPpapiHostImpl;
class ContentBrowserPepperHostFactory;

// TODO(yzshen): Remove this class entirely and let
// TCPServerSocketPrivateResource inherit TCPSocketResourceBase.
class CONTENT_EXPORT PepperTCPServerSocketMessageFilter
    : public ppapi::host::ResourceMessageFilter {
 public:
  PepperTCPServerSocketMessageFilter(ContentBrowserPepperHostFactory* factory,
                                     BrowserPpapiHostImpl* host,
                                     PP_Instance instance,
                                     bool private_api);

  static size_t GetNumInstances();

 protected:
  ~PepperTCPServerSocketMessageFilter() override;

 private:
  enum State {
    STATE_BEFORE_LISTENING,
    STATE_LISTEN_IN_PROGRESS,
    STATE_LISTENING,
    STATE_ACCEPT_IN_PROGRESS,
    STATE_CLOSED
  };

  // ppapi::host::ResourceMessageFilter overrides.
  scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage(
      const IPC::Message& message) override;
  int32_t OnResourceMessageReceived(
      const IPC::Message& msg,
      ppapi::host::HostMessageContext* context) override;

  int32_t OnMsgListen(const ppapi::host::HostMessageContext* context,
                      const PP_NetAddress_Private& addr,
                      int32_t backlog);
  int32_t OnMsgAccept(const ppapi::host::HostMessageContext* context);
  int32_t OnMsgStopListening(const ppapi::host::HostMessageContext* context);

  void DoListen(const ppapi::host::ReplyMessageContext& context,
                const PP_NetAddress_Private& addr,
                int32_t backlog);

  void OnListenCompleted(const ppapi::host::ReplyMessageContext& context,
                         int net_result);
  void OnAcceptCompleted(const ppapi::host::ReplyMessageContext& context,
                         int net_result);

  void SendListenReply(const ppapi::host::ReplyMessageContext& context,
                       int32_t pp_result,
                       const PP_NetAddress_Private& local_addr);
  void SendListenError(const ppapi::host::ReplyMessageContext& context,
                       int32_t pp_result);
  void SendAcceptReply(const ppapi::host::ReplyMessageContext& context,
                       int32_t pp_result,
                       int pending_resource_id,
                       const PP_NetAddress_Private& local_addr,
                       const PP_NetAddress_Private& remote_addr);
  void SendAcceptError(const ppapi::host::ReplyMessageContext& context,
                       int32_t pp_result);

  // Following fields are initialized and used only on the IO thread.
  // Non-owning ptr.
  ppapi::host::PpapiHost* ppapi_host_;
  // Non-owning ptr.
  ContentBrowserPepperHostFactory* factory_;
  PP_Instance instance_;

  State state_;
  scoped_ptr<net::TCPSocket> socket_;
  scoped_ptr<net::TCPSocket> accepted_socket_;
  net::IPEndPoint accepted_address_;

  // Following fields are initialized on the IO thread but used only
  // on the UI thread.
  const bool external_plugin_;
  const bool private_api_;
  int render_process_id_;
  int render_frame_id_;

  DISALLOW_COPY_AND_ASSIGN(PepperTCPServerSocketMessageFilter);
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_TCP_SERVER_SOCKET_MESSAGE_FILTER_H_