text:
'use strict';
var async = require('async')
  , numeral = require('numeral')
var select = require('../helpers/select')
var Payment = require('../models/payment').model
var Expense = require('../models/expense').model
var Receivable = require('../models/receivable').model

/**
 * Create payment
 * @param {object} req
 * @param {object} res
 */
exports.create = function(req,res){
  async.parallel(
    [
      select.openExpense,
      select.openReceivable,
      select.paymentMethod
    ],
    function(err,results){
      if(err){
        req.flash('error',err)
        res.redirect('/')
        return
      }
      res.render('payment/create',{
        expense: results[0],
        receivable: results[1],
        paymentMethod: results[2]
      })
    }
  )

}

/**
 * Save payment
 * @param {object} req
 * @param {object} res
 */
exports.save = function(req,res){
  var type, owner, company
  async.series(
    [
      //format any numbers properly
      function(next){
        req.body.amount = numeral().unformat(req.body.amount)
        next()
      },
      //decide if this payment is towards an expense or receivable
      function(next){
        if(!req.body.owner) return next('No expense or receivable selected')
        var match = req.body.owner.match(/^(expense|receivable)-(.+?)-(.+?)$/)
        if(!match[1] || !match[2]) return next('Could not determine owner of payment')
        type = match[1]
        owner = match[2]
        company = match[3]
        next()
      },
      //save the payment
      function(next){
        var doc = new Payment()
        doc.company = company
        if('expense' === type) doc.expense = owner
        else doc.receivable = owner
        doc.paymentMethod = req.body.paymentMethod
        if(!req.body.paid) doc.paid = new Date()
        else doc.paid = new Date(req.body.paid)
        doc.amount = req.body.amount
        doc.details = req.body.details
        doc.save(function(err){
          if(err) return next(err.message)
          next()
        })
      },
      //apply it to the owner
      function(next){
        if('expense' !== type) return next()
        Expense.findById(owner,function(err,result){
          if(err) return next(err.message)
          if(!result) return next('Could not find expense to apply payment to')
          result.paid = result.paid + req.body.amount
          if(result.paid >= result.amount) result.status = 'closed'
          result.save(function(err){
            if(err) return next(err.message)
            next()
          })
        })
      },
      //apply it to the owner
      function(next){
        if('receivable' !== type) return next()
        Receivable.findById(owner,function(err,result){
          if(err) return next(err.message)
          if(!result) return next('Could not find receivable to apply payment to')
          result.paid = parseFloat(result.paid) + parseFloat(req.body.amount)
          if(result.paid >= result.amount) result.status = 'closed'
          result.save(function(err){
            if(err) return next(err.message)
            next()
          })
        })
      }
    ],
    function(err){
      if(err)
        req.flash('error',err)
      else
        req.flash('success','Payment saved successfully')
      res.redirect('/')
    }
  )
}


text:
package com.speedment.common.codegen.model.value;

import com.speedment.common.codegen.model.Value;

/**
 *
 * @author Emil Forslund
 */
public interface NullValue extends Value<Number> {}

redpajama_set_name: RedPajamaGithub


text:
import "src/external/babel/babel7.js"
import babelPluginSyntaxJSX from "babel-plugin-syntax-jsx";

var babel7 =  window.lively4babel
var babel =  babel7.babel
/*MD

## Duplication Warning  #Babel7

- <edit://src/client/syntax.js>
- <edit://src/external/babel/plugin-babel7.js>
- <edit://src/external/eslint/eslint-parser.js>

MD*/

// some plugins will break the AST!
let plugins = [
  babel7.babelPluginSyntaxClassProperties,
  babel7.babelPluginSyntaxFunctionBind,
  babel7.babelPluginProposalDoExpressions,
  babelPluginSyntaxJSX
  // babelPluginJsxLively
  // babel7.babelPluginProposalExportDefaultFrom,
  // babel7.babelPluginProposalExportNamespaceFrom,
  // babel7.babelPluginNumericSeparator,
  // babel7.babelPluginProposalDynamicImport,
  // babel7.babelPluginTransformModulesSystemJS,
  // babel7.babelPluginTransformReactJsx
];

import { tokTypes } from "src/external/eslint/tokTypes.js";
import { babylonToEspree } from "src/external/eslint/babylon-to-espree7/index.js"

let stage3Syntax = [
  'asyncGenerators',
  'classProperties',
  'classPrivateProperties',
  'classPrivateMethods',
  'dynamicImport',
  'importMeta',
  'nullishCoalescingOperator',
  'numericSeparator',
  'optionalCatchBinding',
  'optionalChaining',
  'objectRestSpread',
  'topLevelAwait'];

export function parse(code,options) {
    return parseForESLint(code, options).ast;
}

export function parseForESLint(code, options) {
  var result = babel.transform(code, {
    filename: undefined,
    sourceMaps: false,
    compact: false,
    sourceType: 'module',
    moduleIds: false,
    comments: true,
    code: true,
    ast: true,
    parserOpts: {
      plugins: stage3Syntax,
      errorRecovery: true,
      ranges: true,
      tokens: true, // TODO Performance warning in migration guide
    },
    plugins: plugins

  })
  var babylonAst = result.ast;

  babylonAst = convertNodes(code, babylonAst, babel.traverse, babel.types);
  var espreeAst = babylonToEspree(babylonAst, babel.traverse, tokTypes, babel.types, code);

  const scopeManager = null;
  const visitorKeys = null;
  return { ast: espreeAst, scopeManager, visitorKeys };

}

function convertNodes(code, ast, traverse, babelTypes) {
    const state = { source: code };
    const traverseRules = {
        noScope: true,
        enter(path) {
            if (path.node.end) {
                path.node.range = [path.node.start, path.node.end];
            }
        },
        ObjectProperty: function(path) {
            path.node.kind = "init";
            path.node.type = "Property";
        },
        ObjectMethod: function(path) {
            if (!path.node || path.node === "method") {
                path.node.kind = "init";
            }
            path.node.value = {
                type: "FunctionExpression",
                start: path.node.start,
                end: path.node.end,
                range: [path.node.start, path.node.end],
                id: path.node.id,
                generator: path.node.generator,
                expression: path.node.expression,
                async: path.node.async,
                params: path.node.params,
                body: path.node.body
            };
            if (path.node.returnType) {
              path.node.value.returnType = path.node.returnType;
            }
            if (path.node.typeParameters) {
              path.node.value.typeParameters = path.node.typeParameters;
            }
            path.node.type = "Property";
        },
        ClassMethod: function(path) {
            path.node.value = {
                type: "FunctionExpression",
                start: path.node.start,
                end: path.node.end,
                range: [path.node.start, path.node.end],
                id: path.node.id,
                generator: path.node.generator,
                expression: path.node.expression,
                async: path.node.async,
                params: path.node.params,
                body: path.node.body
            };
            if (path.node.returnType) {
              path.node.value.returnType = path.node.returnType;
            }
            if (path.node.typeParameters) {
              path.node.value.typeParameters = path.node.typeParameters;
            }
            path.node.type = "MethodDefinition";
        },
        NumericLiteral: function(path) {
            path.node.type = "Literal";
            path.node.raw = path.node.value.toString();
        },
        NullLiteral: function(path) {
            path.node.type = "Literal";
            path.node.value = null;
            path.node.raw = "null";
        },
        StringLiteral: function(path) {
            path.node.type = "Literal";
            path.node.raw = path.node.value.toString();
        },
        BooleanLiteral: function(path) {
            path.node.type = "Literal";
            path.node.raw = path.node.value.toString();
        },
        RegExpLiteral : function(path) {
            path.node.type = "Literal";
            path.node.raw = path.node.extra.raw;
            path.node.value = {};
            path.node.regex = {
              pattern: path.node.pattern,
              flags: path.node.flags
            };
        },

    };

     // Monkey patch visitor keys in order to be able to traverse the estree nodes
    // necessary for a deep traverse
    babelTypes.VISITOR_KEYS.Property = babelTypes.VISITOR_KEYS.ObjectProperty;
    babelTypes.VISITOR_KEYS.MethodDefinition = [
        "key",
        "value",
        "decorators",
        "returnType",
        "typeParameters",
    ];

    ast.range = [ast.start, ast.end];
    traverse(ast, traverseRules, null, state);

    delete babelTypes.VISITOR_KEYS.Property;
    delete babelTypes.VISITOR_KEYS.MethodDefinition;

  return ast;
}


text:
layout: default
title: "Wohnung"
description:
permalink: /category/wohnung/
---
{% include category.html %}


text:
/**
 * Autogenerated by Thrift Compiler (0.12.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
#include "data/extern/thriftv2/replication_types.h"

#include <algorithm>
#include <ostream>

#include <thrift/TToString.h>

namespace org { namespace apache { namespace accumulov2 { namespace core { namespace replication { namespace thrift {

int _kRemoteReplicationErrorCodeValues[] = {
  RemoteReplicationErrorCode::COULD_NOT_DESERIALIZE,
  RemoteReplicationErrorCode::COULD_NOT_APPLY,
  RemoteReplicationErrorCode::TABLE_DOES_NOT_EXIST,
  RemoteReplicationErrorCode::CANNOT_AUTHENTICATE,
  RemoteReplicationErrorCode::CANNOT_INSTANTIATE_REPLAYER
};
const char* _kRemoteReplicationErrorCodeNames[] = {
  "COULD_NOT_DESERIALIZE",
  "COULD_NOT_APPLY",
  "TABLE_DOES_NOT_EXIST",
  "CANNOT_AUTHENTICATE",
  "CANNOT_INSTANTIATE_REPLAYER"
};
const std::map<int, const char*> _RemoteReplicationErrorCode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(5, _kRemoteReplicationErrorCodeValues, _kRemoteReplicationErrorCodeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

std::ostream& operator<<(std::ostream& out, const RemoteReplicationErrorCode::type& val) {
  std::map<int, const char*>::const_iterator it = _RemoteReplicationErrorCode_VALUES_TO_NAMES.find(val);
  if (it != _RemoteReplicationErrorCode_VALUES_TO_NAMES.end()) {
    out << it->second;
  } else {
    out << static_cast<int>(val);
  }
  return out;
}

int _kReplicationCoordinatorErrorCodeValues[] = {
  ReplicationCoordinatorErrorCode::NO_AVAILABLE_SERVERS,
  ReplicationCoordinatorErrorCode::SERVICE_CONFIGURATION_UNAVAILABLE,
  ReplicationCoordinatorErrorCode::CANNOT_AUTHENTICATE
};
const char* _kReplicationCoordinatorErrorCodeNames[] = {
  "NO_AVAILABLE_SERVERS",
  "SERVICE_CONFIGURATION_UNAVAILABLE",
  "CANNOT_AUTHENTICATE"
};
const std::map<int, const char*> _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kReplicationCoordinatorErrorCodeValues, _kReplicationCoordinatorErrorCodeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));

std::ostream& operator<<(std::ostream& out, const ReplicationCoordinatorErrorCode::type& val) {
  std::map<int, const char*>::const_iterator it = _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES.find(val);
  if (it != _ReplicationCoordinatorErrorCode_VALUES_TO_NAMES.end()) {
    out << it->second;
  } else {
    out << static_cast<int>(val);
  }
  return out;
}

WalEdits::~WalEdits() throw() {
}

void WalEdits::__set_edits(const std::vector<std::string> & val) {
  this->edits = val;
}
std::ostream& operator<<(std::ostream& out, const WalEdits& obj)
{
  obj.printTo(out);
  return out;
}

uint32_t WalEdits::read(::apache::thrift::protocol::TProtocol* iprot) {

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->edits.clear();
            uint32_t _size0;
            ::apache::thrift::protocol::TType _etype3;
            xfer += iprot->readListBegin(_etype3, _size0);
            this->edits.resize(_size0);
            uint32_t _i4;
            for (_i4 = 0; _i4 < _size0; ++_i4)
            {
              xfer += iprot->readBinary(this->edits[_i4]);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.edits = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t WalEdits::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("WalEdits");

  xfer += oprot->writeFieldBegin("edits", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->edits.size()));
    std::vector<std::string> ::const_iterator _iter5;
    for (_iter5 = this->edits.begin(); _iter5 != this->edits.end(); ++_iter5)
    {
      xfer += oprot->writeBinary((*_iter5));
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(WalEdits &a, WalEdits &b) {
  using ::std::swap;
  swap(a.edits, b.edits);
  swap(a.__isset, b.__isset);
}

WalEdits::WalEdits(const WalEdits& other6) {
  edits = other6.edits;
  __isset = other6.__isset;
}
WalEdits& WalEdits::operator=(const WalEdits& other7) {
  edits = other7.edits;
  __isset = other7.__isset;
  return *this;
}
void WalEdits::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "WalEdits(";
  out << "edits=" << to_string(edits);
  out << ")";
}

KeyValues::~KeyValues() throw() {
}

void KeyValues::__set_keyValues(const std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyValue> & val) {
  this->keyValues = val;
}
std::ostream& operator<<(std::ostream& out, const KeyValues& obj)
{
  obj.printTo(out);
  return out;
}

uint32_t KeyValues::read(::apache::thrift::protocol::TProtocol* iprot) {

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_LIST) {
          {
            this->keyValues.clear();
            uint32_t _size8;
            ::apache::thrift::protocol::TType _etype11;
            xfer += iprot->readListBegin(_etype11, _size8);
            this->keyValues.resize(_size8);
            uint32_t _i12;
            for (_i12 = 0; _i12 < _size8; ++_i12)
            {
              xfer += this->keyValues[_i12].read(iprot);
            }
            xfer += iprot->readListEnd();
          }
          this->__isset.keyValues = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t KeyValues::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("KeyValues");

  xfer += oprot->writeFieldBegin("keyValues", ::apache::thrift::protocol::T_LIST, 1);
  {
    xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->keyValues.size()));
    std::vector< ::org::apache::accumulov2::core::dataImpl::thrift::TKeyValue> ::const_iterator _iter13;
    for (_iter13 = this->keyValues.begin(); _iter13 != this->keyValues.end(); ++_iter13)
    {
      xfer += (*_iter13).write(oprot);
    }
    xfer += oprot->writeListEnd();
  }
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(KeyValues &a, KeyValues &b) {
  using ::std::swap;
  swap(a.keyValues, b.keyValues);
  swap(a.__isset, b.__isset);
}

KeyValues::KeyValues(const KeyValues& other14) {
  keyValues = other14.keyValues;
  __isset = other14.__isset;
}
KeyValues& KeyValues::operator=(const KeyValues& other15) {
  keyValues = other15.keyValues;
  __isset = other15.__isset;
  return *this;
}
void KeyValues::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "KeyValues(";
  out << "keyValues=" << to_string(keyValues);
  out << ")";
}

ReplicationCoordinatorException::~ReplicationCoordinatorException() throw() {
}

void ReplicationCoordinatorException::__set_code(const ReplicationCoordinatorErrorCode::type val) {
  this->code = val;
}

void ReplicationCoordinatorException::__set_reason(const std::string& val) {
  this->reason = val;
}
std::ostream& operator<<(std::ostream& out, const ReplicationCoordinatorException& obj)
{
  obj.printTo(out);
  return out;
}

uint32_t ReplicationCoordinatorException::read(::apache::thrift::protocol::TProtocol* iprot) {

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast16;
          xfer += iprot->readI32(ecast16);
          this->code = (ReplicationCoordinatorErrorCode::type)ecast16;
          this->__isset.code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->reason);
          this->__isset.reason = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t ReplicationCoordinatorException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("ReplicationCoordinatorException");

  xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->code);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->reason);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(ReplicationCoordinatorException &a, ReplicationCoordinatorException &b) {
  using ::std::swap;
  swap(a.code, b.code);
  swap(a.reason, b.reason);
  swap(a.__isset, b.__isset);
}

ReplicationCoordinatorException::ReplicationCoordinatorException(const ReplicationCoordinatorException& other17) : TException() {
  code = other17.code;
  reason = other17.reason;
  __isset = other17.__isset;
}
ReplicationCoordinatorException& ReplicationCoordinatorException::operator=(const ReplicationCoordinatorException& other18) {
  code = other18.code;
  reason = other18.reason;
  __isset = other18.__isset;
  return *this;
}
void ReplicationCoordinatorException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "ReplicationCoordinatorException(";
  out << "code=" << to_string(code);
  out << ", " << "reason=" << to_string(reason);
  out << ")";
}

const char* ReplicationCoordinatorException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: ReplicationCoordinatorException";
  }
}

RemoteReplicationException::~RemoteReplicationException() throw() {
}

void RemoteReplicationException::__set_code(const RemoteReplicationErrorCode::type val) {
  this->code = val;
}

void RemoteReplicationException::__set_reason(const std::string& val) {
  this->reason = val;
}
std::ostream& operator<<(std::ostream& out, const RemoteReplicationException& obj)
{
  obj.printTo(out);
  return out;
}

uint32_t RemoteReplicationException::read(::apache::thrift::protocol::TProtocol* iprot) {

  ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
  uint32_t xfer = 0;
  std::string fname;
  ::apache::thrift::protocol::TType ftype;
  int16_t fid;

  xfer += iprot->readStructBegin(fname);

  using ::apache::thrift::protocol::TProtocolException;

  while (true)
  {
    xfer += iprot->readFieldBegin(fname, ftype, fid);
    if (ftype == ::apache::thrift::protocol::T_STOP) {
      break;
    }
    switch (fid)
    {
      case 1:
        if (ftype == ::apache::thrift::protocol::T_I32) {
          int32_t ecast19;
          xfer += iprot->readI32(ecast19);
          this->code = (RemoteReplicationErrorCode::type)ecast19;
          this->__isset.code = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      case 2:
        if (ftype == ::apache::thrift::protocol::T_STRING) {
          xfer += iprot->readString(this->reason);
          this->__isset.reason = true;
        } else {
          xfer += iprot->skip(ftype);
        }
        break;
      default:
        xfer += iprot->skip(ftype);
        break;
    }
    xfer += iprot->readFieldEnd();
  }

  xfer += iprot->readStructEnd();

  return xfer;
}

uint32_t RemoteReplicationException::write(::apache::thrift::protocol::TProtocol* oprot) const {
  uint32_t xfer = 0;
  ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
  xfer += oprot->writeStructBegin("RemoteReplicationException");

  xfer += oprot->writeFieldBegin("code", ::apache::thrift::protocol::T_I32, 1);
  xfer += oprot->writeI32((int32_t)this->code);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldBegin("reason", ::apache::thrift::protocol::T_STRING, 2);
  xfer += oprot->writeString(this->reason);
  xfer += oprot->writeFieldEnd();

  xfer += oprot->writeFieldStop();
  xfer += oprot->writeStructEnd();
  return xfer;
}

void swap(RemoteReplicationException &a, RemoteReplicationException &b) {
  using ::std::swap;
  swap(a.code, b.code);
  swap(a.reason, b.reason);
  swap(a.__isset, b.__isset);
}

RemoteReplicationException::RemoteReplicationException(const RemoteReplicationException& other20) : TException() {
  code = other20.code;
  reason = other20.reason;
  __isset = other20.__isset;
}
RemoteReplicationException& RemoteReplicationException::operator=(const RemoteReplicationException& other21) {
  code = other21.code;
  reason = other21.reason;
  __isset = other21.__isset;
  return *this;
}
void RemoteReplicationException::printTo(std::ostream& out) const {
  using ::apache::thrift::to_string;
  out << "RemoteReplicationException(";
  out << "code=" << to_string(code);
  out << ", " << "reason=" << to_string(reason);
  out << ")";
}

const char* RemoteReplicationException::what() const throw() {
  try {
    std::stringstream ss;
    ss << "TException - service has thrown: " << *this;
    this->thriftTExceptionMessageHolder_ = ss.str();
    return this->thriftTExceptionMessageHolder_.c_str();
  } catch (const std::exception&) {
    return "TException - service has thrown: RemoteReplicationException";
  }
}

}}}}}} // namespace


text:
namespace Backend.Models
{
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Web;
    using Domain;

    [NotMapped]
    public class GroupView : Group
    {
        [Display(Name = "Logo")]
        public HttpPostedFileBase LogoGFile { get; set; }
    }
}


text:
<link rel="stylesheet" href="bs-nav-collapse.css">
<polymer-element name="bs-nav-collapse" extends="ul" class="nav nav-collapse collapse">
</polymer-element>


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#ifndef _PAL_SHARED_MEMORY_H_
#define _PAL_SHARED_MEMORY_H_

#include "corunix.hpp"

#ifndef static_assert_no_msg
#define static_assert_no_msg( cond ) static_assert( cond, #cond )
#endif // !static_assert_no_msg

#ifndef _countof
#define _countof(a) (sizeof(a) / sizeof(a[0]))
#endif // !_countof

// - Global shared memory files go in:
//     /tmp/.dotnet/shm/global/<fileName>
// - Session-scoped shared memory files go in:
//     /tmp/.dotnet/shm/session<sessionId>/<fileName>
// - Lock files associated with global shared memory files go in:
//     /tmp/.dotnet/lockfiles/global/<fileName>
// - Lock files associated with session-scoped shared memory files go in:
//     /tmp/.dotnet/lockfiles/session<sessionId>/<fileName>

#define SHARED_MEMORY_MAX_FILE_NAME_CHAR_COUNT (_MAX_FNAME - 1)
#define SHARED_MEMORY_MAX_NAME_CHAR_COUNT (_countof("Global\\") - 1 + SHARED_MEMORY_MAX_FILE_NAME_CHAR_COUNT)

#define SHARED_MEMORY_TEMP_DIRECTORY_PATH "/tmp"
#define SHARED_MEMORY_RUNTIME_TEMP_DIRECTORY_PATH "/tmp/.dotnet"

#define SHARED_MEMORY_SHARED_MEMORY_DIRECTORY_PATH "/tmp/.dotnet/shm"
#define SHARED_MEMORY_LOCK_FILES_DIRECTORY_PATH "/tmp/.dotnet/lockfiles"
static_assert_no_msg(_countof(SHARED_MEMORY_LOCK_FILES_DIRECTORY_PATH) >= _countof(SHARED_MEMORY_SHARED_MEMORY_DIRECTORY_PATH));

#define SHARED_MEMORY_GLOBAL_DIRECTORY_NAME "global"
#define SHARED_MEMORY_SESSION_DIRECTORY_NAME_PREFIX "session"
static_assert_no_msg(_countof(SHARED_MEMORY_SESSION_DIRECTORY_NAME_PREFIX) >= _countof(SHARED_MEMORY_GLOBAL_DIRECTORY_NAME));

#define SHARED_MEMORY_UNIQUE_TEMP_NAME_TEMPLATE "/tmp/.coreclr.XXXXXX"

#define SHARED_MEMORY_MAX_SESSION_ID_CHAR_COUNT (10)

#define SHARED_MEMORY_MAX_FILE_PATH_CHAR_COUNT \
    ( \
        _countof(SHARED_MEMORY_LOCK_FILES_DIRECTORY_PATH) - 1 + \
        1 /* path separator */ + \
        _countof(SHARED_MEMORY_SESSION_DIRECTORY_NAME_PREFIX) - 1 + \
        SHARED_MEMORY_MAX_SESSION_ID_CHAR_COUNT + \
        1 /* path separator */ + \
        SHARED_MEMORY_MAX_FILE_NAME_CHAR_COUNT \
    )
static_assert_no_msg(SHARED_MEMORY_MAX_FILE_PATH_CHAR_COUNT + 1 /* null terminator */ <= MAX_LONGPATH);

class AutoFreeBuffer
{
private:
    void *m_buffer;
    bool m_cancel;

public:
    AutoFreeBuffer(void *buffer);
    ~AutoFreeBuffer();

public:
    void Cancel();
};

enum class SharedMemoryError : DWORD
{
    NameEmpty = ERROR_INVALID_PARAMETER,
    NameTooLong = ERROR_FILENAME_EXCED_RANGE,
    NameInvalid = ERROR_INVALID_NAME,
    HeaderMismatch = ERROR_INVALID_HANDLE,
    OutOfMemory = ERROR_NOT_ENOUGH_MEMORY,
    IO = ERROR_OPEN_FAILED
};

class SharedMemoryException
{
private:
    DWORD m_errorCode;

public:
    SharedMemoryException(DWORD errorCode);
    DWORD GetErrorCode() const;
};

class SharedMemoryHelpers
{
private:
    static const mode_t PermissionsMask_AllUsers_ReadWrite;
    static const mode_t PermissionsMask_AllUsers_ReadWriteExecute;
public:
    static const UINT32 InvalidProcessId;
    static const SIZE_T InvalidThreadId;
    static const UINT64 InvalidSharedThreadId;

public:
    static SIZE_T AlignDown(SIZE_T value, SIZE_T alignment);
    static SIZE_T AlignUp(SIZE_T value, SIZE_T alignment);

    static void *Alloc(SIZE_T byteCount);

    template<SIZE_T DestinationByteCount, SIZE_T SourceByteCount> static SIZE_T CopyString(char (&destination)[DestinationByteCount], SIZE_T destinationStartOffset, const char (&source)[SourceByteCount]);
    template<SIZE_T DestinationByteCount> static SIZE_T CopyString(char (&destination)[DestinationByteCount], SIZE_T destinationStartOffset, LPCSTR source, SIZE_T sourceCharCount);
    template<SIZE_T DestinationByteCount> static SIZE_T AppendUInt32String(char (&destination)[DestinationByteCount], SIZE_T destinationStartOffset, UINT32 value);

    static bool EnsureDirectoryExists(const char *path, bool isGlobalLockAcquired, bool createIfNotExist = true);
private:
    static int Open(LPCSTR path, int flags, mode_t mode = static_cast<mode_t>(0));
public:
    static int OpenDirectory(LPCSTR path);
    static int CreateOrOpenFile(LPCSTR path, bool createIfNotExist = true, bool *createdRef = nullptr);
    static void CloseFile(int fileDescriptor);

    static SIZE_T GetFileSize(int fileDescriptor);
    static void SetFileSize(int fileDescriptor, SIZE_T byteCount);

    static void *MemoryMapFile(int fileDescriptor, SIZE_T byteCount);

    static bool TryAcquireFileLock(int fileDescriptor, int operation);
    static void ReleaseFileLock(int fileDescriptor);
};

class SharedMemoryId
{
private:
    LPCSTR m_name;
    SIZE_T m_nameCharCount;
    bool m_isSessionScope; // false indicates global scope

public:
    SharedMemoryId();
    SharedMemoryId(LPCSTR name, SIZE_T nameCharCount, bool isSessionScope);
    SharedMemoryId(LPCSTR name);

public:
    LPCSTR GetName() const;
    SIZE_T GetNameCharCount() const;
    bool IsSessionScope() const;
    bool Equals(SharedMemoryId *other) const;

public:
    SIZE_T AppendSessionDirectoryName(char (&path)[SHARED_MEMORY_MAX_FILE_PATH_CHAR_COUNT + 1], SIZE_T pathCharCount) const;
};

enum class SharedMemoryType : UINT8
{
    Mutex
};

class SharedMemorySharedDataHeader
{
private:
    union
    {
        struct
        {
            SharedMemoryType m_type;
            UINT8 m_version;
        };
        UINT64 _raw; // use the same size for the header on all archs, and align the data to a pointer
    };

public:
    static SIZE_T DetermineTotalByteCount(SIZE_T dataByteCount);

public:
    SharedMemorySharedDataHeader(SharedMemoryType type, UINT8 version);

public:
    SharedMemoryType GetType() const;
    UINT8 GetVersion() const;
    void *GetData();
};

class SharedMemoryProcessDataBase
{
public:
    virtual void Close(bool isAbruptShutdown, bool releaseSharedData)
    {
    }
};

class SharedMemoryProcessDataHeader
{
private:
    SIZE_T m_refCount;
    SharedMemoryId m_id;
    SharedMemoryProcessDataBase *m_data;
    int m_fileDescriptor;
    SharedMemorySharedDataHeader *m_sharedDataHeader;
    SIZE_T m_sharedDataTotalByteCount;
    SharedMemoryProcessDataHeader *m_nextInProcessDataHeaderList;

public:
    static SharedMemoryProcessDataHeader *CreateOrOpen(LPCSTR name, SharedMemorySharedDataHeader requiredSharedDataHeader, SIZE_T sharedDataByteCount, bool createIfNotExist, bool *createdRef);

public:
    static SharedMemoryProcessDataHeader *PalObject_GetProcessDataHeader(CorUnix::IPalObject *object);
    static void PalObject_SetProcessDataHeader(CorUnix::IPalObject *object, SharedMemoryProcessDataHeader *processDataHeader);
    static void PalObject_Close(CorUnix::CPalThread *thread, CorUnix::IPalObject *object, bool isShuttingDown, bool cleanUpPalSharedState);

private:
    SharedMemoryProcessDataHeader(SharedMemoryId *id, int fileDescriptor, SharedMemorySharedDataHeader *sharedDataHeader, SIZE_T sharedDataTotalByteCount);
public:
    static SharedMemoryProcessDataHeader *New(SharedMemoryId *id, int fileDescriptor, SharedMemorySharedDataHeader *sharedDataHeader, SIZE_T sharedDataTotalByteCount);
    ~SharedMemoryProcessDataHeader();
    void Close();

public:
    SharedMemoryId *GetId();
    SharedMemoryProcessDataBase *GetData() const;
    void SetData(SharedMemoryProcessDataBase *data);
    SharedMemorySharedDataHeader *GetSharedDataHeader() const;
    SIZE_T GetSharedDataTotalByteCount() const;
    SharedMemoryProcessDataHeader *GetNextInProcessDataHeaderList() const;
    void SetNextInProcessDataHeaderList(SharedMemoryProcessDataHeader *next);

public:
    void IncRefCount();
    void DecRefCount();
};

class SharedMemoryManager
{
private:
    static CRITICAL_SECTION s_creationDeletionProcessLock;
    static int s_creationDeletionLockFileDescriptor;

private:
    static SharedMemoryProcessDataHeader *s_processDataHeaderListHead;

#ifdef _DEBUG
private:
    static SIZE_T s_creationDeletionProcessLockOwnerThreadId;
    static SIZE_T s_creationDeletionFileLockOwnerThreadId;
#endif // _DEBUG

public:
    static void StaticInitialize();
    static void StaticClose();

public:
    static void AcquireCreationDeletionProcessLock();
    static void ReleaseCreationDeletionProcessLock();
    static void AcquireCreationDeletionFileLock();
    static void ReleaseCreationDeletionFileLock();

#ifdef _DEBUG
public:
    static bool IsCreationDeletionProcessLockAcquired();
    static bool IsCreationDeletionFileLockAcquired();
#endif // _DEBUG

public:
    static void AddProcessDataHeader(SharedMemoryProcessDataHeader *processDataHeader);
    static void RemoveProcessDataHeader(SharedMemoryProcessDataHeader *processDataHeader);
    static SharedMemoryProcessDataHeader *FindProcessDataHeader(SharedMemoryId *id);
};

#endif // !_PAL_SHARED_MEMORY_H_


text:
"""Fichier contenant la fonction combien_dans."""

from fractions import Fraction

from primaires.scripting.fonction import Fonction
from primaires.scripting.instruction import ErreurExecution

class ClasseFonction(Fonction):

    """Renvoie le nombre d'objets dans un conteneur."""

    @classmethod
    def init_types(cls):
        cls.ajouter_types(cls.cb_dans, "Objet")
        cls.ajouter_types(cls.cb_dans_proto, "Objet", "str")

    @staticmethod
    def cb_dans(conteneur):
        """Renvoie le nombre d'objets contenus dans le conteneur."""
        if conteneur.est_de_type("conteneur de potion"):
            return Fraction(1) if conteneur.potion else Fraction(0)
        if conteneur.est_de_type("conteneur de nourriture"):
            return Fraction(len(conteneur.nourriture))
        if conteneur.est_de_type("conteneur"):
            return Fraction(sum(nb for o, nb in \
                    conteneur.conteneur.iter_nombres))
        raise ErreurExecution("{} n'est pas un conteneur".format(conteneur))

    @staticmethod
    def cb_dans_proto(conteneur, prototype):
        """Renvoie la quantité d'objets du prototype dans le conteneur."""
        if not prototype in importeur.objet.prototypes:
            raise ErreurExecution("prototype {} introuvable".format(prototype))
        prototype = importeur.objet.prototypes[prototype]
        if conteneur.est_de_type("conteneur de potion"):
            if conteneur.potion and conteneur.potion.prototype is prototype:
                return Fraction(1)
            return Fraction(0)

        if conteneur.est_de_type("conteneur de nourriture"):
            return Fraction(len([o for o in conteneur.nourriture if \
                    o.prototype is prototype]))
        if conteneur.est_de_type("conteneur"):
            return Fraction(
                    sum(nb for o, nb in conteneur.conteneur.iter_nombres() \
                    if o.prototype is prototype))
        raise ErreurExecution("{} n'est pas un conteneur".format(conteneur))


text:
<title>Lyq Options</title>
<link rel="stylesheet" type="text/css" href="css/options.css" />

Lyq Options:

Lyq is not allowed to access your Twitter account. <button id="signinButton">Sign in</button>

<button id="signoutButton">Sign out</button>

    <form>
      <fieldset>
        <legend>Tweet options</legend>

          Tweets with URL
          <input type="checkbox" name="tweeturi"/>

          Hashtag#
          <input type="text" name="hashtag"/>

      </fieldset>

Advanced settings

      <fieldset>
        <legend>Bit.ly configuration</legend>

          Account
          <input type="text" name="bitly_login"/>

          API key
          <input type="text" name="bitly_apiKey"/>

      </fieldset>

        <input id="saveButton" type="button" value="Save"/>
        <input id="loadButton" type="button" value="Reset"/>
        <input id="resetButton" type="reset" value="Reset to default"/>

    </form>

Visit Lyq's page.


text:
<?php

return [
    'title' => [
        'settings' => 'Instellingen',
        'general settings' => 'Algemene instellingen',
        'module settings' => 'Module instellingen',
        'module name settings' => ':module module instellingen',
    ],
    'breadcrumb' => [
        'settings' => 'Instellingen',
        'module settings' => ':module module instellingen',
    ],
];


text:
layout: post
title: I've unlinked my feeds
---

In case you were wondering, I have unlinked my feeds. For what it's worth, I
think you should
[unlink your feeds](http://unlinkyourfeeds.tumblr.com/post/387644253/a-manifesto) too.
Life is short, time is precious and I certainly don't have the inclination to
read the same words twice (sometimes more) in one day. Do you?

[Google Buzz](http://www.google.com/buzz) was the straw that broke
the proverbial camel's back. I'm yet to see the point of Buzz;
[Wave](http://wave.google.com/) I get and I like. Buzz, however seems
to be just a waste of time, duplicating items already shared in
[Google Reader](http://www.google.com/reader/),
[Twitter](http://twitter.com/) tweets,
blogs, _etcetera_, _etcetera_, ...

It has to stop!

Like in [Ghostbusters](http://www.imdb.com/title/tt0087332/), we must
never [cross the streams](http://youtu.be/VjZP7jIR40w).

Some of the streams that I had once consolidated but have since torn asunder are
enumerated below, in case you were used to having them aggregated:

- [My Flickr photostream](http://flickr.com/photos/johnsyweb/)
- [My shared items](http://google.com/reader/shared/johnsyweb) on [Google Reader](http://www.google.com/reader/)
- [_paj_Log](http://johnsy.com/blog/), my blog
- [My recently listened tracks](http://last.fm/user/johnsyweb) on [Last.fm](http://last.fm/)
- [My tweets](http://twitter.com/johnsyweb/) on [Twitter](http://twitter.com/)
- [My recent Youtube videos](http://youtube.com/user/johnsyweb)

There are a few others, such as [my Facebook
profile](http://www.facebook.com/johnsyweb), but I think a wise reader like
yourself is getting the gist of how to find me online.


text:
@interface FSLoginTextField() <UITextFieldDelegate>

@end

@implementation FSLoginTextField
{
    BOOL _hasButton;
    NSString *fs_placeholder;
    UIView *_innerView;
    UILabel *_innerLabel;
    BOOL _isIconfont;
}

- (instancetype)initWithPlaceholder:(NSString *)placeholder hasButton:(BOOL)hasButton {
    self = [super init];
    if (self) {
        _hasButton = hasButton;
        fs_placeholder = placeholder;
        self.delegate = self;
        [self fs_setUI];
    }
    return self;
}

- (instancetype)initWithPlaceholder:(NSString *)placeholder hasButton:(BOOL)hasButton isIconfont:(BOOL)isIconfont {
    self = [self initWithPlaceholder:placeholder hasButton:hasButton];
    if (self) {
        _isIconfont = isIconfont;
    }
    return self;
}

#pragma mark - private

- (void)fs_setUI {
    NSAssert(fs_placeholder.length>0, @"需要设置 placeholder");
    // setup placeholder
    CGFloat fontSize = fs_placeholder.length > 15 ? 14.0f : 17.0f;
    NSAttributedString *attrString = [[NSAttributedString alloc] initWithString:fs_placeholder attributes:@{NSForegroundColorAttributeName:[UIColor loginPlaceholderColor],NSFontAttributeName:[UIFont fontWithName:kFontMedium size:fontSize]}];
    self.attributedPlaceholder = attrString;
    self.backgroundColor = [UIColor fsTextFieldBGColor];
    [self setTintColor:[UIColor blackColor]];
    if (_hasButton) {
        _innerLabel = [[UILabel alloc] init];
        _innerView = [UIView new];
        [self addSubview:_innerView];
        _innerView.backgroundColor = [UIColor mainDefaultColor];
        _innerLabel.font = [UIFont fontWithName:kFontMedium size:14.0f];
        _innerLabel.textColor = [UIColor blackColor];
        _innerLabel.textAlignment = NSTextAlignmentCenter;
        UITapGestureRecognizer *labelGes = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fs_buttonAction)];
        [_innerLabel addGestureRecognizer:labelGes];
        _innerLabel.userInteractionEnabled = YES;
        [_innerView addSubview:_innerLabel];
    }
}

- (void)drawRect:(CGRect)rect {
    if (_hasButton) {
        CGSize btnSize = [self.btnText boundingRectWithSize:CGSizeMake(MAXFLOAT, 25) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont fontWithName:kFontMedium size:14.0f]} context:nil].size;
        if (_isIconfont) {
            btnSize = CGSizeMake(20, 14);
        }
        _innerView.frame = CGRectMake(self.frame.size.width-btnSize.width-30, 0, btnSize.width+30, self.frame.size.height);
        _innerLabel.frame = _innerView.bounds;
    }
}

- (CGRect)placeholderRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x+15, bounds.origin.y, bounds.size.width, bounds.size.height);
}

- (CGRect)editingRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x+15, bounds.origin.y, bounds.size.width-30, bounds.size.height);
}

- (CGRect)textRectForBounds:(CGRect)bounds {
    return CGRectMake(bounds.origin.x+15, bounds.origin.y, bounds.size.width-30, bounds.size.height);
}

#pragma mark - action

- (void)fs_buttonAction {
    if (self.didClickButton) {
        self.didClickButton();
    }
}

#pragma mark - delegate

- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    if (self.shouldReturn) {
        self.shouldReturn(self);
    }
    return YES;
}

//- (BOOL)textFieldShouldClear:(UITextField *)textField {
//
//}
//
//- (void)textFieldDidEndEditing:(UITextField *)textField {
//
//}
//
//- (void)textFieldDidBeginEditing:(UITextField *)textField {
//
//}
//
//- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
//
//}
//
//- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
//
//}
//
//- (void)textFieldDidEndEditing:(UITextField *)textField reason:(UITextFieldDidEndEditingReason)reason {
//
//}

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
    if (self.maxInput == 0) {
        if (self.didChanged) {
            self.didChanged(self);
        }
    } else {
        if ([string isEqualToString:@""]) {
            return YES;
        }
        if (textField.text.length >= self.maxInput) {
            return NO;
        } else {
            if (self.didChanged) {
                self.didChanged(self);
            }
        }
    }
    return YES;
}

#pragma mark - setter

- (void)setBtnText:(NSString *)btnText {
    _btnText = btnText;
    [_innerLabel stringWithIconfont:btnText fontSize:16.0f];
    [self layoutIfNeeded];
}

- (void)setEnableInput:(BOOL)enableInput {
    self.enabled = enableInput;
}

@end


text:
module Debugger
  module EvalFunctions # :nodoc:
    def run_with_binding
      binding = @state.context ? get_binding : TOPLEVEL_BINDING
      $__dbg_interface = @state.interface
      eval(<<-EOC, binding)
        __dbg_verbose_save=$VERBOSE; $VERBOSE=false
        def dbg_print(*args)
          $__dbg_interface.print(*args)
        end
        remove_method :puts if self.respond_to?(:puts) &&
          defined?(remove_method)
        def dbg_puts(*args)
          $__dbg_interface.print(*args)
          $__dbg_interface.print("\n")
        end
        $VERBOSE=__dbg_verbose_save
      EOC
      yield binding
    ensure
      $__dbg_interface = nil
    end
  end

  class EvalCommand < Command # :nodoc:
    register_setting_get(:autoeval) do
      EvalCommand.unknown
    end
    register_setting_set(:autoeval) do |value|
      EvalCommand.unknown = value
    end

    # Set default value
    Command.settings[:autoeval] = 1

    def match(input)
      @input = input
      super
    end

    def regexp
      /^\s*(p|e(?:val)?)\s+/
    end

    def execute
      expr = @match ? @match.post_match : @input
      run_with_binding do |b|
        print pr("eval.result", expr: expr, result: debug_eval(expr, b).inspect)
      end
    end

    class << self
      def help_command
        %w|p eval|
      end

      def help(cmd)
        if cmd == 'p'
          %{
            p expression\tevaluate expression and print its value
          }
        else
          %{
            e[val] expression\tevaluate expression and print its value,
            \t\t\talias for p.
            * NOTE - to turn on autoeval, use 'set autoeval'
          }
        end
      end
    end
  end

  class PPCommand < Command # :nodoc:
    self.allow_in_control = true

    def regexp
      /^\s*pp\s+/
    end

    def execute
      out = StringIO.new
      run_with_binding do |b|
        PP.pp(debug_eval(@match.post_match, b), out)
      end
      print out.string
    rescue
      out.puts $!.message
    end

    class << self
      def help_command
        'pp'
      end

      def help(cmd)
        %{
          pp expression\tevaluate expression and pretty-print its value
        }
      end
    end
  end

  class PutLCommand < Command # :nodoc:
    self.allow_in_control = true

    def regexp
      /^\s*putl\s+/
    end

    def execute
      out = StringIO.new
      run_with_binding do |b|
        vals = debug_eval(@match.post_match, b)
        if vals.is_a?(Array)
          vals = vals.map{|item| item.to_s}
          print "#{columnize(vals, self.class.settings[:width])}\n"
        else
          PP.pp(vals, out)
          print out.string
        end
      end
    rescue
      out.puts $!.message
    end

    class << self
      def help_command
        'putl'
      end

      def help(cmd)
        %{
          putl expression\t\tevaluate expression, an array, and columnize its value
        }
      end
    end
  end

  class PSCommand < Command # :nodoc:
    self.allow_in_control = true

    include EvalFunctions

    def regexp
      /^\s*ps\s+/
    end

    def execute
      out = StringIO.new
      run_with_binding do |b|
        vals = debug_eval(@match.post_match, b)
        if vals.is_a?(Array)
          vals = vals.map{|item| item.to_s}
          print "#{columnize(vals.sort!, self.class.settings[:width])}\n"
        else
          PP.pp(vals, out)
          print out.string
        end
      end
    rescue
      out.puts $!.message
    end

    class << self
      def help_command
        'ps'
      end

      def help(cmd)
        %{
          ps expression\tevaluate expression, an array, sort, and columnize its value
        }
      end
    end
  end

end


text:
@implementation UIButton (Custom)

- (NSString *)translateKey
{
    return nil;
}

- (void)setTranslateKey:(NSString *)translateKey
{
    [self setTitleForAllState:NSLocalizedString(translateKey, nil)];
}

- (NSString *)fontName {
    return self.titleLabel.font.fontName;
}

- (void)setFontName:(NSString *)fontName {
    self.titleLabel.font =
    [UIFont fontWithName:fontName
                    size:self.titleLabel.font.pointSize];
}

- (NSString *)resizedImageName
{
    return nil;
}

- (void)setResizedImageName:(NSString *)resizedImageName
{
    UIImage *normalImage = [UIImage imageNamed:resizedImageName];
    UIImage *selectedImage =
    [UIImage imageNamed:[NSString stringWithFormat:@"%@Selected",
                                                  resizedImageName]];

	CGFloat hInset = floorf(normalImage.size.width / 4);
	CGFloat vInset = floorf(normalImage.size.height / 2);
	UIEdgeInsets insets = UIEdgeInsetsMake(vInset, hInset,
                                           vInset, hInset);
	normalImage = [normalImage resizableImageWithCapInsets:insets];
    selectedImage = [selectedImage resizableImageWithCapInsets:insets];

    [self setBackgroundImage:normalImage
                    forState:UIControlStateNormal];
    [self setBackgroundImage:selectedImage
                    forState:UIControlStateHighlighted];
    [self setBackgroundImage:selectedImage
                    forState:UIControlStateSelected];
}

- (CGFloat)minimumScale
{
    return 0.0f;
}

- (void)setMinimumScale:(CGFloat)minimumScale
{
    self.titleLabel.adjustsFontSizeToFitWidth = TRUE;
    self.titleLabel.minimumScaleFactor = minimumScale;
    self.titleLabel.numberOfLines = 1;
}

- (void)setTitleForAllState:(NSString *)title
{
    [self setTitle:title
          forState:UIControlStateNormal];
    [self setTitle:title
          forState:UIControlStateHighlighted];
    [self setTitle:title
          forState:UIControlStateSelected];
    [self setTitle:title
          forState:UIControlStateDisabled];
}

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="au.com.sensis"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <uses-sdk android:minSdkVersion="10" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:debuggable="true" >
        <activity
            android:name=".Search"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
         <activity
            android:name=".Serp"
            android:label="@string/app_name" >
        </activity>
         <activity
            android:name=".Bpp"
            android:label="@string/app_name" >
        </activity>
    </application>

</manifest>


text:
#include <aws/chime-sdk-voice/model/ListSipMediaApplicationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>

#include <utility>

using namespace Aws::ChimeSDKVoice::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;

ListSipMediaApplicationsRequest::ListSipMediaApplicationsRequest() :
    m_maxResults(0),
    m_maxResultsHasBeenSet(false),
    m_nextTokenHasBeenSet(false)
{
}

Aws::String ListSipMediaApplicationsRequest::SerializePayload() const
{
  return {};
}

void ListSipMediaApplicationsRequest::AddQueryStringParameters(URI& uri) const
{
    Aws::StringStream ss;
    if(m_maxResultsHasBeenSet)
    {
      ss << m_maxResults;
      uri.AddQueryStringParameter("max-results", ss.str());
      ss.str("");
    }

    if(m_nextTokenHasBeenSet)
    {
      ss << m_nextToken;
      uri.AddQueryStringParameter("next-token", ss.str());
      ss.str("");
    }

}


text:
namespace School
{
    using System;
    using System.Collections.Generic;

    public class Class : IComments
    {
        private List<Teacher> teachers;
        private List<Student> students;
        private string textID;
        private string comments;

        public Class(string textID, params Teacher[] teachers)
        {
            this.TextID = textID;
            this.teachers = new List<Teacher>(teachers);
            this.students = new List<Student>();
        }

        public string TextID
        {
            get
            {
                return this.textID;
            }
            set
            {
                if (string.IsNullOrEmpty(value))
                {
                    throw new ArgumentException("Class Text Identifier can not be null or empty!");
                }
                this.textID = value;
            }
        }

        public Teacher[] Teachers
        {
            get
            {
                return this.teachers.ToArray();
            }
        }

        public Student[] Students
        {
            get
            {
                return this.students.ToArray();
            }
        }

        public string Comments
        {
            get
            {
                if (this.comments == null)
                {
                    return "No comments yet";
                }
                return this.comments;
            }
            set
            {
                this.comments = value;
            }
        }
    }
}


text:
using Ku.Core.CMS.Web.Extensions;
using Ku.Core.CMS.Web.Security;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Ku.Core.CMS.Web.Backend.Pages
{
    [Auth]
    public class IndexModel : PageModel
    {
        public void OnGet()
        {
            ViewData["LoginUserName"] = User.GetUserNameOrNull();
        }
    }
}


text:
<?php

namespace Xola\ElasticsearchProxyBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class XolaElasticsearchProxyBundle extends Bundle
{
}


text:
<?php
/**
 * Message translations.
 *
 * This file is automatically generated by 'yii message/extract' command.
 * It contains the localizable messages extracted from source code.
 * You may modify this file by translating the extracted messages.
 *
 * Each array element represents the translation (value) of a message (key).
 * If the value is empty, the message is considered as not translated.
 * Messages that no longer need translation will have their translations
 * enclosed between a pair of '@@' marks.
 *
 * Message string can be used with plural forms format. Check i18n section
 * of the guide for details.
 *
 * NOTE: this file must be saved in UTF-8 encoding.
 */
return [
    'Visible for members only' => '',
    'Visible for members+guests' => '',
    'Min value is 20 seconds. If not set, session will timeout after 1400 seconds (24 minutes) regardless of activity (default session timeout)' => 'Minumum værdi er 20 sekunder. Hvis den ikke er sat, vil sessioner udløbe efter 1400 sekunder (24 minutter) uanset aktivitet (standard session-udløb)',
    'Only applicable when limited access for non-authenticated users is enabled. Only affects new users.' => 'Kun tilgængelig ved begrænset adgang for ikke-autentificeret brugere hvis aktiveret. Påvirker kun nye brugere.',
    'Save' => 'Gem',
];


text:
This optional module is used to assign organization roles

## Example Usage
```
module "organization-iam-bindings" {
  source        = "terraform-google-modules/iam/google//modules/organizations_iam"
  organizations = ["my-organization_one", "my-organization_two"]
  mode          = "authoritative"

  bindings = {
    "roles/resourcemanager.organizationViewer" = [
      "serviceAccount:my-sa@my-project.iam.gserviceaccount.com",
      "group:my-group@my-org.com",
      "user:my-user@my-org.com",
    ]
    "roles/resourcemanager.projectDeleter" = [
      "serviceAccount:my-sa@my-project.iam.gserviceaccount.com",
      "group:my-group@my-org.com",
      "user:my-user@my-org.com",
    ]
  }
  conditional_bindings = [
    {
      role = "roles/editor"
      title = "expires_after_2019_12_31"
      description = "Expiring at midnight of 2019-12-31"
      expression = "request.time < timestamp(\"2020-01-01T00:00:00Z\")"
      members = ["user:my-user@my-org.com"]
    }
  ]
}
```

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| bindings | Map of role (key) and list of members (value) to add the IAM policies/bindings | `map(list(string))` | `{}` | no |
| conditional\_bindings | List of maps of role and respective conditions, and the members to add the IAM policies/bindings |
list(object({
    role        = string
    title       = string
    description = string
    expression  = string
    members     = list(string)
  }))
 | `[]` | no |
| mode | Mode for adding the IAM policies/bindings, additive and authoritative | `string` | `"additive"` | no |
| organizations | Organizations list to add the IAM policies/bindings | `list(string)` | `[]` | no |

## Outputs

| Name | Description |
|------|-------------|
| members | Members which were bound to organizations. |
| organizations | Organizations which received bindings. |
| roles | Roles which were assigned to members. |


text:
package net.bubuxi.mc.marriage.listeners;

import net.bubuxi.mc.marriage.Marriage;
import net.bubuxi.mc.marriage.enums.Gender;
import net.bubuxi.mc.marriage.manager.MainManager;

import org.bukkit.ChatColor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;

public class ChatListener implements Listener {

	MainManager mm;
	public ChatListener() {
		mm = Marriage.getInstance().mainM;
	}

	@EventHandler(priority = EventPriority.HIGH)
	public void onChat(AsyncPlayerChatEvent e) {
		String format = e.getFormat();
		if(mm.getGender(e.getPlayer().getName())==Gender.MALE) {
			format =  ChatColor.BLUE + "��" + ChatColor.RESET + format;
		}
		else if(mm.getGender(e.getPlayer().getName())==Gender.FEMALE) {
			format = ChatColor.LIGHT_PURPLE + "��" + ChatColor.RESET + format;
		}
		e.setFormat(format);
	}

}