text:
#include "HG_SDK.h"

//-------------------------------------------------------
//
//-------------------------------------------------------
BOOL APIENTRY DllMain(HANDLE hModule,
                       DWORD  ul_reason_for_call,
                       LPVOID lpReserved
					)
{
    switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH:
			{
				Loaded = false;
				ConfigOn = false;

				// do a version check to make sure users dont have older versions of HGooey
				if (!HGVersionCheck(HGVersion))
					return FALSE;

				// load and create stuff here (ie load extensions, create textures/images/objects/etc)

				// make sure the no one moved the extension
				if (GetFileAttributes("HGooey Files/XenDLL/Extensions/Safe_Typer/HG_SDK.dll") == 0xFFFFFFFF) return FALSE;

				const char* Data;

				if (Data = ReadConfigItem("Chatmode", "HGooey Files/XenDLL/Common/Memory.xml"))
				{
					// check the chatmode memory address
					try { Chatmode = (DWORD*)atoi(Data); }
					catch (...) { return FALSE; }
				}
				else
				{
					return FALSE;
				}

				Loaded = true;
			}
			break;
		case DLL_PROCESS_DETACH:
			{
				if (!Loaded) return TRUE;

				Loaded = false;

				// unload and destroy stuff here (ie unload extensions)
			}
			break;

    }

    return TRUE;
}

//-------------------------------------------------------
// the device was lost (ie ALT+TAB to minimize the game)
//-------------------------------------------------------
void LostDevice(void)
{
	if (!Loaded) return;

	// any textures created using CreateIDDTextureFromFile(float,float,char*,UINT)
	// are automatically released by HGooey. this does not, however, cover
	// textures created using CreateIDDTexture(float,float,IDirect3DTexture8*)
}

//-------------------------------------------------------
//
//-------------------------------------------------------
void ResetDevice(void)
{
	if (!Loaded) return;

	// any textures created using CreateIDDTextureFromFile(float,float,char*,UINT)
	// are automatically restored by HGooey. this does not, however, cover
	// textures created using CreateIDDTexture(float,float,IDirect3DTexture8*)
}

//-------------------------------------------------------
// called before any extensions draw on the screen
//-------------------------------------------------------
void PreRender(void)
{
	if (!Loaded) return;

	// DO NOT DRAW IN HERE, ALL DRAWING IS DISABLED.
	// ONLY DRAW IN Render()
}

//-------------------------------------------------------
// do your drawing / call your main code in here
//-------------------------------------------------------
void Render(void)
{
	if (!Loaded) return;

	// draw text or execute/call main code

	if (ConfigOn)
	{
		/**
		if (Config window's 'close button' was pushed)
		{
			ConfigOn = false;
		}
		else
		{
			// draw your config window
		}
		/**/
	}
}

//-------------------------------------------------------
// handle mouse input
//
// return true = send command to game
// return false = do not send the command to the game
//-------------------------------------------------------
bool HandleMouse()
{
	if (!Loaded) return true;

	MouseInfo xMouse = Mouse();

	if (xMouse.cState == 0) // mouse move
	{
	}
	else if (xMouse.cState == 1) // left button down
	{
		if (*Chatmode == 2)
			*Chatmode = 0;

		/**
		// (optional) cancel click if other buttons are being pressed
		if (xMouse.MButtonDown || xMouse.RButtonDown)
			return false;
		/**/
	}
	else if (xMouse.cState == 2) // left button up
	{
	}
	else if (xMouse.cState == 3) // middle button down
	{
		/**
		// (optional) cancel click if other buttons are being pressed
		if (xMouse.LButtonDown || xMouse.RButtonDown)
			return false;
		/**/
	}
	else if (xMouse.cState == 4) // middle button up
	{
	}
	else if (xMouse.cState == 5) // right button down
	{
		/**
		// (optional) cancel click if other buttons are being pressed
		if (xMouse.LButtonDown || xMouse.MButtonDown)
			return false;
		/**/
	}
	else if (xMouse.cState == 6) // right button up
	{
	}
	else // mouse scroll
	{
	}

	return true;
}

//-------------------------------------------------------
// handle keyboard input
//
// cKey = DIK_[Key]
// bDown = pressed down if true, released if false
//
// return true = send command to game
// return false = do not send the command to the game
//
// DirectInput Key-Identifier Table:
// http://calc.xentales.com/HGooey/DIK.html or
// http://www.xentales.com/calc/HGooey/DIK.html
//-------------------------------------------------------
bool HandleKeyboard()
{
	if (!Loaded) return true;

	KeyInfo xKey = Key();

	if (xKey.bDown) // key is pressed down
	{
	}
	else if (!xKey.bRepeat) // key has been released
	{
	}

	return true;
}

//-------------------------------------------------------
// turn on the config window
//
// there is no reason to edit this, build your
// config window when the .dll is first loaded.
// however, there is nothing critical here, so
// you do what you want here.
//-------------------------------------------------------
void Config(void)
{
	ConfigOn = true;
}

//-------------------------------------------------------
// version check called by XenDLL
//-------------------------------------------------------
UINT HGSDKVersionCheck(void)
{
	// DO NOT EDIT THIS
	return 61225;
}


text:
package rest

import (
	"github.com/gocraft/web"
	"b00lduck/datalogger/dataservice/orm"
	"net/http"
	"io/ioutil"
	"strconv"
)

// Get all flags
func (c *Context) FlagHandler(rw web.ResponseWriter, req *web.Request) {
	var flags []orm.Counter
	db.Find(&flags)
	marshal(rw, flags)
}

// Get specific flag by code
func (c *Context) FlagByCodeHandler(rw web.ResponseWriter, req *web.Request) {

	code := parseStringPathParameter(req, "code")
	var flag orm.Flag
	db.Where(&orm.Flag{Code: code}).First(&flag)

	if (flag.ID == 0) {
		rw.WriteHeader(http.StatusNotFound)
		rw.Write([]byte("Flag not found"))
		return
	}

	marshal(rw, flag)
}

// Chenge flag state by code
func (c *Context) FlagByCodeChangeStateHandler(rw web.ResponseWriter, req *web.Request) {

	code := parseStringPathParameter(req, "code")
	var flag orm.Flag
	db.Where(&orm.Flag{Code: code}).First(&flag)

	if (flag.ID == 0) {
		rw.WriteHeader(http.StatusNotFound)
		rw.Write([]byte("Flag not found"))
		return
	}

	body, err := ioutil.ReadAll(req.Body);
	if err != nil {
		rw.WriteHeader(http.StatusInternalServerError)
		rw.Write([]byte("Could not read body"))
		return
	}

	state, err := strconv.Atoi(string(body))
	if err != nil {
		rw.WriteHeader(http.StatusBadRequest)
		rw.Write([]byte("Could not parse state"))
		return
	}

	flagState := orm.NewFlagState(flag, uint8(state))
	db.Create(&flagState)

	flag.State = uint8(state)
	flag.LastChange = flagState.Timestamp
	db.Save(flag)

	marshal(rw, flagState)
}

// Get flag states in a optionally given time range
// Query parameters: start,end
func (c *Context) FlagByCodeGetStatesHandler(rw web.ResponseWriter, req *web.Request) {

	code := parseStringPathParameter(req, "code")
	var flag orm.Flag
	db.Where(&orm.Flag{Code: code}).First(&flag)

	if (flag.ID == 0) {
		rw.WriteHeader(http.StatusNotFound)
		rw.Write([]byte("Flag not found"))
		return
	}

	start,err := c.parseUintQueryParameter(rw, "start")
	if (err != nil) {
		return
	}

	end,err := c.parseUintQueryParameter(rw, "end")
	if (err != nil) {
		return
	}

	var flagStates []orm.FlagState
	orm.GetOrderedWindowedQuery(db, "flag_id", flag.ID, start, end).Find(&flagStates)

	var startReading orm.FlagState
	var endReading orm.FlagState

	if len(flagStates) == 0 {

		startReading = orm.FlagState{
			State: flag.State,
			Timestamp: start,
			FlagID: flag.ID,
		}

		endReading = orm.FlagState{
			State: flag.State,
			Timestamp: end,
			FlagID: flag.ID,
		}

	} else {

		if db.Where("timestamp < ? and flag_id = ?", start, flag.ID).Order("timestamp desc").First(&startReading).RecordNotFound() {
			startReading = orm.FlagState{
				State: flagStates[0].State,
				Timestamp: start,
				FlagID: flag.ID,
			}
		} else {
			startReading.Timestamp = start
		}

		if db.Where("timestamp > ? and flag_id = ?", end, flag.ID).Order("timestamp asc").First(&endReading).RecordNotFound() {
			endReading = orm.FlagState{
				State: flagStates[len(flagStates) - 1].State,
				Timestamp: end,
				FlagID: flag.ID,
			}
		} else {
			endReading.Timestamp = end
		}

	}

	flagStates = append([]orm.FlagState{startReading}, flagStates...)
	flagStates = append(flagStates, endReading)

	marshal(rw, flagStates)

}

redpajama_set_name: RedPajamaGithub


text:
echo '*** Generating Sphinx HTML documentations...'
cd ../sphinx
make clean
make html

if [ "$?" -ne 0 ]; then
    echo "*** Errors occurred"
    exit 1
fi

echo '*** Done'


text:
<?php

namespace Home\Traits;

trait GetPost {

    protected $oGet = null;
    protected $oPost = null;

    protected function initializeGetPost() {
        if (is_object($this->oGet)) return true;
        $this->oGet = new \Yuphp\Utility\Array2($_GET);
        $this->oPost = new \Yuphp\Utility\Array2($_POST);
        return true;
    }

}


text:
package org.apache.bcel.generic;

/**
 * DNEG - Negate double
 *
Stack: ..., value.word1, value.word2 -> ..., result.word1, result.word2

 *
 * @version $Id$
 * @author  M. Dahm
 */
public class DNEG extends ArithmeticInstruction {

    private static final long serialVersionUID = -8860107731099493429L;

    public DNEG() {
        super(org.apache.bcel.Constants.DNEG);
    }

    /**
     * Call corresponding visitor method(s). The order is:
     * Call visitor methods of implemented interfaces first, then
     * call methods according to the class hierarchy in descending order,
     * i.e., the most specific visitXXX() call comes last.
     *
     * @param v Visitor object
     */
    @Override
    public void accept( Visitor v ) {
        v.visitTypedInstruction(this);
        v.visitStackProducer(this);
        v.visitStackConsumer(this);
        v.visitArithmeticInstruction(this);
        v.visitDNEG(this);
    }
}


text:
<html>
  <head>
    <title>ReactVR</title>
    <style>body { margin: 0; }</style>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
  </head>
  <body>
    <!-- When you're ready to deploy your app, update this line to point to your compiled client.bundle.js -->
    <script src="./client.bundle?platform=vr"></script>
    <script>
      // Initialize the React VR application
      ReactVR.init(
        // When you're ready to deploy your app, update this line to point to
        // your compiled index.bundle.js
        '../index.vr.bundle?platform=vr&dev=true',
        // Attach it to the body tag
        document.body
      );
    </script>
  </body>
</html>


text:
'use strict';
var webtestDriver = require('../src/web-test-driver');
var retry = require('../src/webdriverjs-retry');

const RE_STR_WITH_QUOTE = '[\'"]([\\s\\S]+)[\'"]'; //e.g. 'foo bar', "foo bar"

/**
 * e.g. click link 'hello world'
 */
module.exports = {
  name: 'click link',
  help: 'click link <link-text>',
  regExp: new RegExp(`^click link ${RE_STR_WITH_QUOTE}`),
  func: /** must return a Promise, so that it can be chained with next command*/
    function(linkText) {
      var fn = () => {
        webtestDriver.findBy('linkText', linkText)
        .then(element => {
          return element.click()
        });
      };
      return retry.run(fn, 5000, 200);
    }
};


text:
@interface PodsDummy_Pods_SpringBoard_Tests : NSObject
@end
@implementation PodsDummy_Pods_SpringBoard_Tests
@end


text:
package de.mickare.routernet.router.config;

import com.google.common.base.Preconditions;
import com.zaxxer.hikari.HikariDataSource;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;

// UNUSED, if used again undeprecate it.
@Deprecated
public @NoArgsConstructor @Data class DatabaseConfig {
  private int maximumPoolSize = 1;
  @NonNull
  private String dataSourceClassName = "com.mysql.jdbc.jdbc2.optional.MysqlDataSource";
  @NonNull
  private String serverName = null;
  private int port = 3306;
  @NonNull
  private String databaseName = null;
  @NonNull
  private String user = null;
  @NonNull
  private String password = null;

  // Recommended MySQL Settings
  private boolean cachePrepStmts = true;
  private int prepStmtCacheSize = 250;
  private int prepStmtCacheSqlLimit = 2048;
  private boolean useServerPrepStmts = true;

  public HikariDataSource toDataSource() {
    Preconditions.checkNotNull(this.serverName);
    Preconditions.checkNotNull(this.databaseName);
    Preconditions.checkNotNull(this.user);
    Preconditions.checkNotNull(this.password);

    HikariDataSource s = new HikariDataSource();
    s.setMaximumPoolSize(this.maximumPoolSize);
    s.setDataSourceClassName(this.dataSourceClassName);
    s.addDataSourceProperty("serverName", this.serverName);
    s.addDataSourceProperty("port", this.port);
    s.addDataSourceProperty("databaseName", this.databaseName);
    s.addDataSourceProperty("user", this.user);
    s.addDataSourceProperty("password", this.password);

    s.addDataSourceProperty("cachePrepStmts", this.cachePrepStmts);
    s.addDataSourceProperty("prepStmtCacheSize", this.prepStmtCacheSize);
    s.addDataSourceProperty("prepStmtCacheSqlLimit", this.prepStmtCacheSqlLimit);
    s.addDataSourceProperty("useServerPrepStmts", this.useServerPrepStmts);

    return s;
  }
}


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

import {AbstractComponent} from '@common/component/abstract.component';
import {Component, ElementRef, Injector, OnDestroy, OnInit} from '@angular/core';
import {PermissionService} from '../../../../user/service/permission.service';
import {Role} from 'app/domain/user/role/role';
import {CommonUtil} from 'app/common/util/common.util';

@Component({
  selector: 'app-user-management-permission',
  templateUrl: './user-management-permission.component.html'
})
export class UserManagementPermissionComponent extends AbstractComponent implements OnInit, OnDestroy {

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Private Variables
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Protected Variables
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Public Variables
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
  public roleList: Role[] = [];

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Constructor
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  // 생성자
  constructor(private permissionService: PermissionService,
              protected elementRef: ElementRef,
              protected injector: Injector) {
    super(elementRef, injector);
  }

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Override Method
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  // Init
  public ngOnInit() {
    super.ngOnInit();
    this.loadingShow();
    this.permissionService.getRoles({scope: 'GLOBAL'}).then((roles) => {
      if (roles['_embedded'] && roles['_embedded']['roles']) {
        this.roleList = roles['_embedded']['roles'].filter(item => {
          return item.name !== '__ADMIN' && item.name !== '__GUEST';
        });
      }
      this.loadingHide();
    }).catch(err => this.commonExceptionHandler(err));
  }

  // Destroy
  public ngOnDestroy() {
    super.ngOnDestroy();
  }

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Public Method
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/

  /**
   * Navigate to role detail page
   * @param {Role} role
   */
  public moveToRoleDetail(role: Role) {
    this.router.navigate(['/admin/user/permission/', role.id]).then();
  } // function - moveToRoleDetail

  /**
   * 시스템의 RoleName 을 이용하여, Resource에 정의된 Role 명칭을 얻음
   * @param {string} role
   * @return {string}
   */
  public getRoleName(role: string): string {
    const strMsgCode: string = CommonUtil.getMsgCodeBySystemRole(role);
    return ('' === strMsgCode) ? '' : this.translateService.instant(strMsgCode);
  } // function - getRoleName

  /**
   * 시스템의 RoleName 을 이용하여, Resource에 정의된 Role 설명을 얻음
   * @param {string} role
   * @return {string}
   */
  public getRoleDesc(role: string): string {
    const strMsgCode: string = CommonUtil.getMsgCodeBySystemRole(role);
    return ('' === strMsgCode) ? '' : this.translateService.instant(strMsgCode + '.desc');
  } // function - getRoleDesc

  /*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
   | Private Method
   |-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
}


text:
require 'test_helper'

class PrepaidMedicalsControllerTest < ActionController::TestCase
  setup do
    @prepaid_medical = prepaid_medicals(:one)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:prepaid_medicals)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create prepaid_medical" do
    assert_difference('PrepaidMedical.count') do
      post :create, prepaid_medical: { name: @prepaid_medical.name }
    end

    assert_redirected_to prepaid_medical_path(assigns(:prepaid_medical))
  end

  test "should show prepaid_medical" do
    get :show, id: @prepaid_medical
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @prepaid_medical
    assert_response :success
  end

  test "should update prepaid_medical" do
    put :update, id: @prepaid_medical, prepaid_medical: { name: @prepaid_medical.name }
    assert_redirected_to prepaid_medical_path(assigns(:prepaid_medical))
  end

  test "should destroy prepaid_medical" do
    assert_difference('PrepaidMedical.count', -1) do
      delete :destroy, id: @prepaid_medical
    end

    assert_redirected_to prepaid_medicals_path
  end
end


text:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>execution::mapping_t::other_t::is_applicable_property_v</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../execution__mapping_t__other_t.html" title="execution::mapping_t::other_t">
<link rel="prev" href="../execution__mapping_t__other_t.html" title="execution::mapping_t::other_t">
<link rel="next" href="is_preferable.html" title="execution::mapping_t::other_t::is_preferable">

Home
Libraries
People
FAQ
More

execution::mapping_t::other_t::is_applicable_property_v

The
          execution::mapping_t::other_t
          property applies to executors, senders, and schedulers.

template <typename T>
static constexpr bool is_applicable_property_v =
    is_executor_v<T> || is_sender_v<T> || is_scheduler_v<T>;

Copyright © 2003-2021 Christopher
      M. Kohlhoff

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
<?php
	session_start();
	if (isset($_SESSION['uid'])) {
		print 'authentified';
	}


text:
#include "canonical.h"
#include "identifier.h"
#include "options.h"
#include "parse_buffer.h"

using namespace std;

/** \file canonical.cpp
 *	This file implements specializations of
 *	`template struct canonical<What>`
 */

/// \cond NO_DOXYGEN
bool innards::canonical_base::cxx() const {
	return !options::plaintext();
}

template<>
template<class CharSeq>
void canonical<symbol>::canonicalize(chewer<CharSeq> & chew)
{
	chew(continuation);
	if (chew && identifier::is_start_char(*chew)) {
		_canonical.append(1,*chew);
		chew(+1,continuation);
		for ( ; chew && identifier::is_valid_char(*chew);
				chew(+1,continuation)) {
			_canonical.append(1,*chew);
		}
	}
}

template
void canonical<symbol>::canonicalize(chewer<string> & chew);
template
void canonical<symbol>::canonicalize(chewer<parse_buffer> & chew);

/// \endcond NO_DOXYGEN

/* EOF */


text:
set -o nounset -o xtrace

MYSELF=`which "$0" 2>/dev/null`
MYSELF=`dirname $MYSELF`
[ $? -gt 0 -a -f "$0" ] && MYSELF="."

java=java
if [ "${JAVA_HOME:=xx}" != "xx" ] ; then
    java="$JAVA_HOME/bin/java"
fi

result=`$java -jar /usr/local/bin/atag-one.jar -o csv`

if [ $? -eq 0 ] ; then

room_temp=`echo ${result} | cut --delimiter=\  -f 1`
outside_temp=`echo ${result} | cut --delimiter=\  -f 2`
pressure=`echo ${result} | cut --delimiter=\  -f 3`
water_temp=`echo ${result} | cut --delimiter=\  -f 4`
water_return_temp=`echo ${result} | cut --delimiter=\  -f 5`
target_temp=`echo ${result} | cut --delimiter=\  -f 6`
ch_setpoint=`echo ${result} | cut --delimiter=\  -f 7`
flame_status=`echo ${result} | cut --delimiter=\  -f 8`
boiler_heating_for=`echo ${result} | cut --delimiter=\  -f 9`

# Insert values in database.
#
#CREATE TABLE IF NOT EXISTS CV
#(
#  id               INT(11)  NOT NULL AUTO_INCREMENT,
#  date             DATETIME NOT NULL,
#  room_temp        LONG     NOT NULL,
#  outside_temp     LONG     NOT NULL,
#  pressure         LONG     NOT NULL,
#  water_temp       LONG     NOT NULL,
#  water_return_temp LONG     NOT NULL,
#  PRIMARY KEY (id)
#);
#
# ALTER TABLE CV CHANGE room_temp room_temp DOUBLE NOT NULL default 0;
# ALTER TABLE CV CHANGE outside_temp outside_temp DOUBLE NOT NULL default 0;
# ALTER TABLE CV CHANGE pressure pressure  DOUBLE NOT NULL default 0;
# ALTER TABLE CV CHANGE water_temp water_temp  DOUBLE NOT NULL default 0;
# ALTER TABLE CV CHANGE water_return_temp water_return_temp  DOUBLE NOT NULL default 0;
# ALTER TABLE CV ADD target_temp  DOUBLE NOT NULL default 0;
# ALTER TABLE CV ADD ch_setpoint  DOUBLE NOT NULL default 0;
# ALTER TABLE CV ADD flame_status  INT NOT NULL default 0;
# ALTER TABLE CV ADD boiler_heating_for VARCHAR(10);

echo "use electricity; INSERT INTO CV (date, room_temp, outside_temp, pressure, water_temp, water_return_temp, target_temp, ch_setpoint, flame_status, boiler_heating_for) VALUES (now(), $room_temp, $outside_temp, $pressure, $water_temp, $water_return_temp, $target_temp, $ch_setpoint, $flame_status, '$boiler_heating_for');" | mysql -u electricity -pel8761

fi

exit 0


text:
package com.android.multiwindowplayground;

import com.android.multiwindowplayground.activities.AdjacentActivity;
import com.android.multiwindowplayground.activities.BasicActivity;
import com.android.multiwindowplayground.activities.CustomConfigurationChangeActivity;
import com.android.multiwindowplayground.activities.LaunchBoundsActivity;
import com.android.multiwindowplayground.activities.LoggingActivity;
import com.android.multiwindowplayground.activities.MinimumSizeActivity;
import com.android.multiwindowplayground.activities.UnresizableActivity;

import android.app.ActivityOptions;
import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends LoggingActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        View multiDisabledMessage = findViewById(R.id.warning_multiwindow_disabled);
        // Display an additional message if the app is not in multiwindow mode.
        if (!isInMultiWindowMode()) {
            multiDisabledMessage.setVisibility(View.VISIBLE);
        } else {
            multiDisabledMessage.setVisibility(View.GONE);
        }
    }

    public void onStartUnresizableClick(View view) {
        Log.d(mLogTag, "** starting UnresizableActivity");

        /*
         * This activity is marked as 'unresizable' in the AndroidManifest. We need to specify the
         * FLAG_ACTIVITY_NEW_TASK flag here to launch it into a new task stack, otherwise the
         * properties from the root activity would have been inherited (which was here marked as
         * resizable by default).
        */
        Intent intent = new Intent(this, UnresizableActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
    }

    public void onStartMinimumSizeActivity(View view) {
        Log.d(mLogTag, "** starting MinimumSizeActivity");

        startActivity(new Intent(this, MinimumSizeActivity.class));
    }

    public void onStartAdjacentActivity(View view) {
        Log.d(mLogTag, "** starting AdjacentActivity");

        /*
         * Start this activity adjacent to the focused activity (ie. this activity) if possible.
         * Note that this flag is just a hint to the system and may be ignored. For example,
         * if the activity is launched within the same task, it will be launched on top of the
         * previous activity that started the Intent. That's why the Intent.FLAG_ACTIVITY_NEW_TASK
         * flag is specified here in the intent - this will start the activity in a new task.
         */
        Intent intent = new Intent(this, AdjacentActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT | Intent.FLAG_ACTIVITY_NEW_TASK);
        startActivity(intent);
    }

    public void onStartLaunchBoundsActivity(View view) {
        Log.d(mLogTag, "** starting LaunchBoundsActivity");

        // Define the bounds in which the Activity will be launched into.
        Rect bounds = new Rect(500, 300, 100, 0);

        // Set the bounds as an activity option.
        ActivityOptions options = ActivityOptions.makeBasic();
        options.setLaunchBounds(bounds);

        // Start the LaunchBoundsActivity with the specified options
        Intent intent = new Intent(this, LaunchBoundsActivity.class);
        startActivity(intent, options.toBundle());

    }

    public void onStartBasicActivity(View view) {
        Log.d(mLogTag, "** starting BasicActivity");

        // Start an Activity with the default options in the 'singleTask' launch mode as defined in
        // the AndroidManifest.xml.
        startActivity(new Intent(this, BasicActivity.class));

    }

    public void onStartCustomConfigurationActivity(View view) {
        Log.d(mLogTag, "** starting CustomConfigurationChangeActivity");

        // Start an Activity that handles all configuration changes itself.
        startActivity(new Intent(this, CustomConfigurationChangeActivity.class));

    }
}


text:
import * as path from "path";

import { INodeItem }from "./inodeitem";
import { ProjectReferencesNode }from "./projectReferences";
import { NugetReferencesNode }from "./nugetReferences";
import { ItemsNode}from "./fileItems";

export class ProjectNode implements INodeItem {
    kind: string;
    label: string;

    getChildren(): Thenable<INodeItem[]> {
        return Promise.resolve([ new ProjectReferencesNode(this.filePath), new NugetReferencesNode(this.filePath), new ItemsNode(this.filePath)]);
    }

    constructor(public filePath:string) {
        this.kind = "node";
        this.label = `${path.basename(filePath, path.extname(filePath))}`;
    }
}


text:
package io.ph.bot.commands.general;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.awt.image.RasterFormatException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Random;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import javax.imageio.ImageIO;

import org.apache.commons.io.FileUtils;

import io.ph.bot.commands.Command;
import io.ph.bot.commands.CommandCategory;
import io.ph.bot.commands.CommandData;
import io.ph.bot.model.Permission;
import io.ph.util.Util;
import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.MessageBuilder;
import net.dv8tion.jda.core.entities.Message;

/**
 * Slice up an emoji into a 5x5 grid for Nitro purposes
 * A foray into meme territory
 * @author Paul
 *
 */
@CommandData (
		defaultSyntax = "slice",
		aliases = {"splice"},
		category = CommandCategory.UTILITY,
		permission = Permission.NONE,
		description = "Slice up an Emoji into a 5x5 grid for Nitro purposes\n"
				+ "Takes in one emoji and a single, no space name after",
		example = ":thinking: nameOfEmote"
		)
public class Slice extends Command {

	@Override
	public void executeCommand(Message msg) {
		int i = Math.abs(new Random().nextInt());
		EmbedBuilder em = new EmbedBuilder();
		String name = Util.getCommandContents(Util.getCommandContents(msg));
		try {
			File saved = new File("resources/tempdownloads/" + i + "/original.png");
			saved.getParentFile().mkdirs();
			saved.createNewFile();
			new File(saved.getParentFile().getAbsolutePath() + "/splice/").mkdirs();
			Util.saveFile(new URL(msg.getEmotes().get(0).getImageUrl()), saved);
			FileUtils.copyInputStreamToFile(Waifu2x.waifu2x(saved), saved);

			BufferedImage img = ImageIO.read(saved);
			BufferedImage newImage = new BufferedImage(
					img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_ARGB);

			Graphics2D g = newImage.createGraphics();
			g.drawImage(img, 0, 0, null);
			g.dispose();
			String code = cut(newImage, name, i);
			MessageBuilder mb = new MessageBuilder();
			mb.appendCodeBlock(code, "");
			msg.getChannel().sendFile(pack(new File("resources/tempdownloads/" + i + "/")), name + ".zip",
					mb.build()).queue(success -> {
						try {
							FileUtils.deleteDirectory(saved.getParentFile());
						} catch (Exception e) {
							e.printStackTrace();
						}
					});

		} catch (MalformedURLException e) {
			em.setTitle("Error", null)
			.setColor(Color.RED)
			.setDescription("Error finding a valid Emoji to slice");
			msg.getChannel().sendMessage(em.build()).queue();
		} catch (IOException e) {
			e.printStackTrace();
			em.setTitle("Error", null)
			.setColor(Color.RED)
			.setDescription("Error processing the image");
			msg.getChannel().sendMessage(em.build()).queue();
		}
	}

	/**
	 * Cut an image into a 5x5 grid
	 * @param img Image to cut
	 * @param nameOfEmoji Name of the emoji
	 * @param directoryNum Number where the temp resources are stored
	 * @return String of array to use
	 * @throws IOException Error accessing files
	 */
	private static String cut(BufferedImage img, String nameOfEmoji, int directoryNum) throws IOException {
		BufferedImage[][] array;
		img = scale(img, 320, 320);
		int height = img.getHeight();
		int width = img.getWidth();
		// How big each slice is
		int columnSlice = 64;
		int rowSlice = 64;

		int columns = height / columnSlice;
		int rows = width / rowSlice;

		array = new BufferedImage[columns][rows];
		int counter = 0;
		StringBuilder copy = new StringBuilder();
		for (int j = 0; j < rows; j++) {
			for (int i = 0; i < columns; i++) {
				try {
					array[i][j] = img.getSubimage(i * columnSlice, j * rowSlice, columnSlice, rowSlice);
				} catch (RasterFormatException e) {
					try {
						if (e.getMessage().contains("y + height")) {
							array[i][j] = img.getSubimage(i * columnSlice, j * rowSlice, columnSlice, height - (j * rowSlice));
						} else if (e.getMessage().contains("x + height")) {
							array[i][j] = img.getSubimage(i * columnSlice, j * rowSlice, columnSlice - (i * columnSlice), height);
						}
					} catch (RasterFormatException e1) {
						continue;
					}
				}
				copy.append(String.format(":%s%d:", nameOfEmoji, counter));
				ImageIO.write(array[i][j], "png", new File("resources/tempdownloads/"
						+ directoryNum + "/splice/" + nameOfEmoji + counter++ + ".png"));

			}
			copy.append("\n");
		}

		return copy.toString();
	}

	/**
	 * Scale an image
	 * @param imageToScale Image to scale
	 * @param newWidth New width
	 * @param newHeight New height
	 * @return Bufferedimage scaled w/ an alpha channel
	 */
	private static BufferedImage scale(BufferedImage imageToScale, int newWidth, int newHeight) {
		BufferedImage scaledImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_ARGB);
		Graphics2D graphics2D = scaledImage.createGraphics();
		graphics2D.drawImage(imageToScale, 0, 0, newWidth, newHeight, null);
		graphics2D.dispose();
		return scaledImage;
	}

	/**
	 * Pack emojis into one zip file
	 * @param directory Directory that includes the folder (which is stored in /splice/*.png)
	 * @return Zipped file
	 * @throws IOException
	 */
	private static File pack(File directory) throws IOException {
		byte[] buffer = new byte[1024];
		File toReturn = new File(directory.getAbsolutePath() + "/splice.zip");
		ZipOutputStream zip = new ZipOutputStream(new FileOutputStream(toReturn));

		File dir = new File(directory.getAbsolutePath() + "/splice/");
		for (File f : dir.listFiles()) {
			FileInputStream in = new FileInputStream(f);

			zip.putNextEntry(new ZipEntry(f.getName()));
			int length;

			while((length = in.read(buffer)) > 0) {
				zip.write(buffer, 0, length);
			}
			in.close();
			zip.closeEntry();
		}
		zip.close();

		return toReturn;
	}
}


text:
#include <aws/autoscaling/model/DescribeScheduledActionsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>

#include <utility>

using namespace Aws::AutoScaling::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;

DescribeScheduledActionsResult::DescribeScheduledActionsResult()
{
}

DescribeScheduledActionsResult::DescribeScheduledActionsResult(const AmazonWebServiceResult<XmlDocument>& result)
{
  *this = result;
}

DescribeScheduledActionsResult& DescribeScheduledActionsResult::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
  const XmlDocument& xmlDocument = result.GetPayload();
  XmlNode rootNode = xmlDocument.GetRootElement();
  XmlNode resultNode = rootNode.FirstChild("DescribeScheduledActionsResult");

  if(!resultNode.IsNull())
  {
    XmlNode scheduledUpdateGroupActionsNode = resultNode.FirstChild("ScheduledUpdateGroupActions");
    if(!scheduledUpdateGroupActionsNode.IsNull())
    {
      XmlNode scheduledUpdateGroupActionsMember = scheduledUpdateGroupActionsNode.FirstChild("member");
      while(!scheduledUpdateGroupActionsMember.IsNull())
      {
        m_scheduledUpdateGroupActions.push_back(scheduledUpdateGroupActionsMember);
        scheduledUpdateGroupActionsMember = scheduledUpdateGroupActionsMember.NextNode("member");
      }

    }
    XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
    if(nextTokenNode.IsNull())
    {
      nextTokenNode = resultNode;
    }

    if(!nextTokenNode.IsNull())
    {
      m_nextToken = StringUtils::Trim(nextTokenNode.GetText().c_str());
    }
  }

  XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
  m_responseMetadata = responseMetadataNode;

  return *this;
}


text:
using namespace cocos2d;

SneakyJoystickSkinnedBase::~SneakyJoystickSkinnedBase()
{
    if (backgroundSprite)
    {
        backgroundSprite->release();
        backgroundSprite = NULL;
    }

    if (thumbSprite)
    {
        thumbSprite->release();
        thumbSprite = NULL;
    }

    if (joystick)
    {
        joystick->release();
        joystick = NULL;
    }
}

bool SneakyJoystickSkinnedBase::init()
{
    bool pRet = false;
    if(Layer::init()){
        this->backgroundSprite = NULL;

        this->thumbSprite = NULL;

        this->joystick = NULL;

        this->schedule(schedule_selector(SneakyJoystickSkinnedBase::updatePositions));
        pRet = true;
    }
    return pRet;
}

void SneakyJoystickSkinnedBase::updatePositions(float delta)
{
    if(joystick && thumbSprite)
        thumbSprite->setPosition(joystick->getStickPosition());
}

void SneakyJoystickSkinnedBase::setContentSize(Size s)
{
    Layer::setContentSize(s);
    ////////backgroundSprite->setContentSize(s);
    //joystick.joystickRadius = s.width/2;
}

void SneakyJoystickSkinnedBase::setBackgroundSprite(Sprite *aSprite)
{
    if(backgroundSprite){
        if(backgroundSprite->getParent())
            backgroundSprite->getParent()->removeChild(backgroundSprite, true);
        backgroundSprite->release();
    }
    aSprite->retain();
    backgroundSprite = aSprite;
    if(aSprite){
        this->addChild(backgroundSprite, 0);
        this->setContentSize(backgroundSprite->getContentSize());
    }
}

void SneakyJoystickSkinnedBase::setThumbSprite(Sprite *aSprite)
{
    if(thumbSprite){
        if(thumbSprite->getParent())
            thumbSprite->getParent()->removeChild(thumbSprite, true);
        thumbSprite->release();
    }
    aSprite->retain();
    thumbSprite = aSprite;
    if(aSprite){
        this->addChild(thumbSprite, 1);
        //joystick->setThumbRadius(thumbSprite->getContentSize().width/2);
    }
}

void SneakyJoystickSkinnedBase::setJoystick(SneakyJoystick *aJoystick)
{
    if(joystick){
        if(joystick->getParent())
            joystick->getParent()->removeChild(joystick, true);
        joystick->release();
    }
    aJoystick->retain();
    joystick = aJoystick;
    if(aJoystick){
        this->addChild(aJoystick, 2);
        if(thumbSprite)
            joystick->setThumbRadius(thumbSprite->boundingBox().size.width/2);
        else
            joystick->setThumbRadius(0);

        if(backgroundSprite)
            joystick->setJoystickRadius(backgroundSprite->boundingBox().size.width/2);
    }
}


text:
module FakeSNS
  class TopicCollection

    include Enumerable

    def initialize(store)
      @store = store
      @store["topics"] ||= []
    end

    def collection
      @store["topics"]
    end

    def reset
      @store["topics"] = []
    end

    def each(*args, &block)
      collection.map { |item| Topic.new(item) }.each(*args, &block)
    end

    def fetch(arn, &default)
      default ||= -> { raise InvalidParameterValue, "Unknown topic #{arn}" }
      found = collection.find do |topic|
        topic["arn"] == arn
      end
      found || default.call
    end

    def create(attributes)
      collection << attributes
    end

    def delete(arn)
      collection.delete(fetch(arn))
    end

  end
end


text:
module Rack::App::Middlewares::Hooks
  require "rack/app/middlewares/hooks/base"
  require "rack/app/middlewares/hooks/before"
  require "rack/app/middlewares/hooks/after"
end


text:
<?php

namespace Bootstrap\Console;

use View;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;

class MailInlinerCommand extends SlayerCommand
{
    protected $name = 'mail:inliner';
    protected $description = 'Parse templates inlining css and js';

    /**
     * It combines all the css provided so that the system could
     * analyze which class/ids will be used and will be inlined
     *
     * @param mixed $css_files
     * @return string
     */
    protected function combineCss($css_files)
    {
        $combined_css = null;

        foreach ($css_files as $css) {
            $combined_css .=
                file_get_contents(
                    remove_double_slash($css)
                );
        }

        return $combined_css;
    }

    /**
     * A parser function or rebuilder to inline original file
     * into an email based html
     *
     * @param mixed $record assigned key from inliner config
     * @return null
     */
    protected function parse($record)
    {
        # ---- instatiate the package inliner
        $inliner = new CssToInlineStyles;

        # ---- let's get the views dir combine the record file
        $base_file = remove_double_slash(
            View::getViewsDir() . $record->file . '.*'
        );

        # ---- now get all related glob
        $related_files = glob($base_file);
        if (empty($related_files) == true) {
            $this->comment('   System can\'t find the file: ' . $base_file);

            return;
        }

        # ---- set the html
        $inliner->setHTML(
            file_get_contents($related_files[0])
        );

        # ---- set the css files
        $inliner->setCSS(
            $this->combineCss($record['css'])
        );

        # ----  get the dirname and file name
        $dirname = dirname($related_files[0]);
        $converted_name = basename($record->file) . '-inligned.volt';

        # ---- overwrite or create a file based on the dirname
        # and file name
        file_put_contents(
            $dirname . '/' . $converted_name,
            rawurldecode($inliner->convert())
        );

        # ---- log, show some sucess
        $this->comment('   ' . basename($record->file) . ' inlined! saved as ' . $converted_name);
    }

    /**
     * {@inheritDoc}
     */
    public function slash()
    {
        # ---- show some pretty comments that we're now inlining
        $this->comment('Inlining...');

        # ---- let's get if there's an option assigned to 'record'
        $record = $this->input->getOption('record');

        # ---- get all the records in inliner.php file
        $records = config()->inliner->toArray();

        # ---- determine if option 'record' is not empty
        # then we should get the specific inline key
        if (strlen($record) != 0) {

            if (isset($records[$record]) == false) {
                $this->error($record . ' not found!');

                return;
            }

            $this->parse(config()->inliner->{$record});
        }

        # ---- or, else parse all the inliner
        else {
            foreach (config()->inliner as $record) {
                $this->parse($record, true);
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    protected function options()
    {
        return [
            ['record', null, InputOption::VALUE_OPTIONAL, 'The record key to be parsed.', null],
        ];
    }
}


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

namespace MSOZ3
{
    [Serializable()]
    class MSOException: Exception
    {
        public MSOException() : base() { }
        public MSOException(string message) : base(message) { }
        public MSOException(string message, System.Exception inner) : base(message, inner) { }

        // A constructor is needed for serialization when an
        // exception propagates from a remoting server to the client.
        protected MSOException(System.Runtime.Serialization.SerializationInfo info,
            System.Runtime.Serialization.StreamingContext context) { }
    }
}


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package be;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author root
 */
@Entity
@Table(name = "unidad_transporte")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "UnidadTransporte.findAll", query = "SELECT u FROM UnidadTransporte u"),
    @NamedQuery(name = "UnidadTransporte.findByIdUnidadTransporte", query = "SELECT u FROM UnidadTransporte u WHERE u.idUnidadTransporte = :idUnidadTransporte"),
    @NamedQuery(name = "UnidadTransporte.findByMarca", query = "SELECT u FROM UnidadTransporte u WHERE u.marca = :marca"),
    @NamedQuery(name = "UnidadTransporte.findByNumeroPlaca", query = "SELECT u FROM UnidadTransporte u WHERE u.numeroPlaca = :numeroPlaca"),
    @NamedQuery(name = "UnidadTransporte.findByNumeroConstanciaInscripcion", query = "SELECT u FROM UnidadTransporte u WHERE u.numeroConstanciaInscripcion = :numeroConstanciaInscripcion"),
    @NamedQuery(name = "UnidadTransporte.findByObservaciones", query = "SELECT u FROM UnidadTransporte u WHERE u.observaciones = :observaciones"),
    @NamedQuery(name = "UnidadTransporte.findByEstadoExistencia", query = "SELECT u FROM UnidadTransporte u WHERE u.estadoExistencia = :estadoExistencia"),
    @NamedQuery(name = "UnidadTransporte.findByFechaRegistro", query = "SELECT u FROM UnidadTransporte u WHERE u.fechaRegistro = :fechaRegistro"),
    @NamedQuery(name = "UnidadTransporte.findByFechaModificacion", query = "SELECT u FROM UnidadTransporte u WHERE u.fechaModificacion = :fechaModificacion")})
public class UnidadTransporte implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_unidad_transporte")
    private Integer idUnidadTransporte;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "marca")
    private String marca;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "numero_placa")
    private String numeroPlaca;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "numero_constancia_inscripcion")
    private String numeroConstanciaInscripcion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "observaciones")
    private String observaciones;
    @Basic(optional = false)
    @NotNull
    @Column(name = "estado_existencia")
    private int estadoExistencia;
    @Column(name = "fecha_registro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaRegistro;
    @Column(name = "fecha_modificacion")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaModificacion;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "unidadTransporte", fetch = FetchType.EAGER)
    private List<GuiaRemicion> guiaRemicionList;
    @JoinColumn(name = "id_empleado_modifica", referencedColumnName = "id_empleado")
    @ManyToOne(optional = false, fetch = FetchType.EAGER)
    private Empleado empleado;
    @JoinColumn(name = "id_empleado_crea", referencedColumnName = "id_empleado")
    @ManyToOne(optional = false, fetch = FetchType.EAGER)
    private Empleado empleado1;

    public UnidadTransporte() {
    }

    public UnidadTransporte(Integer idUnidadTransporte) {
        this.idUnidadTransporte = idUnidadTransporte;
    }

    public UnidadTransporte(Integer idUnidadTransporte, String marca, String numeroPlaca, String numeroConstanciaInscripcion, String observaciones, int estadoExistencia) {
        this.idUnidadTransporte = idUnidadTransporte;
        this.marca = marca;
        this.numeroPlaca = numeroPlaca;
        this.numeroConstanciaInscripcion = numeroConstanciaInscripcion;
        this.observaciones = observaciones;
        this.estadoExistencia = estadoExistencia;
    }

    public Integer getIdUnidadTransporte() {
        return idUnidadTransporte;
    }

    public void setIdUnidadTransporte(Integer idUnidadTransporte) {
        this.idUnidadTransporte = idUnidadTransporte;
    }

    public String getMarca() {
        return marca;
    }

    public void setMarca(String marca) {
        this.marca = marca;
    }

    public String getNumeroPlaca() {
        return numeroPlaca;
    }

    public void setNumeroPlaca(String numeroPlaca) {
        this.numeroPlaca = numeroPlaca;
    }

    public String getNumeroConstanciaInscripcion() {
        return numeroConstanciaInscripcion;
    }

    public void setNumeroConstanciaInscripcion(String numeroConstanciaInscripcion) {
        this.numeroConstanciaInscripcion = numeroConstanciaInscripcion;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public int getEstadoExistencia() {
        return estadoExistencia;
    }

    public void setEstadoExistencia(int estadoExistencia) {
        this.estadoExistencia = estadoExistencia;
    }

    public Date getFechaRegistro() {
        return fechaRegistro;
    }

    public void setFechaRegistro(Date fechaRegistro) {
        this.fechaRegistro = fechaRegistro;
    }

    public Date getFechaModificacion() {
        return fechaModificacion;
    }

    public void setFechaModificacion(Date fechaModificacion) {
        this.fechaModificacion = fechaModificacion;
    }

    @XmlTransient
    public List<GuiaRemicion> getGuiaRemicionList() {
        return guiaRemicionList;
    }

    public void setGuiaRemicionList(List<GuiaRemicion> guiaRemicionList) {
        this.guiaRemicionList = guiaRemicionList;
    }

    public Empleado getEmpleado() {
        return empleado;
    }

    public void setEmpleado(Empleado empleado) {
        this.empleado = empleado;
    }

    public Empleado getEmpleado1() {
        return empleado1;
    }

    public void setEmpleado1(Empleado empleado1) {
        this.empleado1 = empleado1;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idUnidadTransporte != null ? idUnidadTransporte.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UnidadTransporte)) {
            return false;
        }
        UnidadTransporte other = (UnidadTransporte) object;
        if ((this.idUnidadTransporte == null && other.idUnidadTransporte != null) || (this.idUnidadTransporte != null && !this.idUnidadTransporte.equals(other.idUnidadTransporte))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "be.UnidadTransporte[ idUnidadTransporte=" + idUnidadTransporte + " ]";
    }

}


text:
<!doctype html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="robots" content="noindex, nofollow">

  <title>Daughter of the Burning City by Amanda Foody – Suffolk Libraries</title>

	<meta name="twitter:card" content="summary_large_image">
	<meta name="twitter:site" content="@suffolklibrary">
	<meta name="twitter:title" content="Daughter of the Burning City by Amanda Foody">
	<meta name="twitter:description" content="Daughter of the Burning City is an awe-inspiring and thrilling dark fantasy from a bold new voice in YA.">
	<meta name="twitter:image" content="/images/featured/featured-daughter-of-the-burning-city.jpg">
	<meta name="twitter:image:alt" content="Daughter of the Burning City">

  <link rel="stylesheet" href="/css/style.css">
	<link rel="preload" as="font" type="font/woff2" href="/fonts/source-sans-pro-v11-latin-regular.woff2">
	<link rel="preload" as="font" type="font/woff2" href="/fonts/source-sans-pro-v11-latin-italic.woff2">
	<link rel="preload" as="font" type="font/woff2" href="/fonts/source-sans-pro-v11-latin-700.woff2">

Skip to content

Skip to navigation menu

💳 You can now pay online.
	Pay charges now →

Donate

Join

Login

Search

Home

eLibrary

Online events

Help

Contact

    Home

      → New suggestions

      → Young adult

      → Daughter of the Burning City by Amanda Foody

Daughter of the Burning City by Amanda Foody

  Written by Emily Mitchell · Published Jan 30, 2018 · Filed under Sci fi and fantasy

See Daughter of the Burning City in our catalogue

"Even among the many unusual members of the travelling circus that has always been her home, 16-year-old Sorina stands apart as the only illusion-worker born in hundreds of years. This rare talent allows her to create illusions that others can see, feel and touch, with personalities all of their own. Her creations are her family, and together they make up the cast of the festival's freak show.

"But no matter how lifelike they may seem, her illusions are still just that - illusions, and not truly real. Or so she always believed - until one of them is murdered. Now she must unravel the horrifying truth before all her loved ones disappear."

I completely adored Daughter of the Burning City.

Every character leaps off the page. They are so engaging and Sorina's family of illusions really feel like they could live down the street. They made it impossible to put the book down.

The plot is simply spellbinding. It's everything you could want from a YA thriller: gripping plot, shocking twists and nail-bitingly tense scenes. You can never really tell who you can trust, which is just how I like my mysteries.

Foody weaves a brilliant world, expertly blending the futuristic time period and the vaguely creepy, magical atmosphere of the circus. I could happily read further books set in this universe, but the plot is wrapped up so well that another book may ruin it.

Daughter of the Burning City is an awe-inspiring and thrilling dark fantasy from a bold new voice in YA. What more could you ask for?

Emily Mitchell

I'm a volunteer book reviewer. Visit my book blog.

About our Young Adult section

Book reviews, reading suggestions and blog posts from our staff and young adult readers. Want to write for our website? Email us at help@suffolklibraries.co.uk.

More Young adult

New Young Adult books for March 2020

Wranglestone by Darren Charlton

Recommended Young Adult titles to mark LGBT History Month 2020

With the Fire on High by Elizabeth Acevedo

New Young Adult books for February 2020

The Poet X by Elizabeth Acevedo

Find your new favourite book with the 2020 Read for Empathy YA book collection

The Deathless Girls by Kiran Millwood Hargrave

The Beautiful by Renée Ahdieh

Feast your eyes on our stunning Young Adult comic books

More suggestions

Fiction

Audiobooks

Films & DVDs

eLibrary picks

Children's books

Young adult

Non-fiction

Music

Meet the Author interviews

Articles

 Health and wellbeing

Reviews

Book club favourites

Keep updated

Get the latest suggestions, releases and reviews delivered straight to you.

Email newsletter

Facebook

Twitter

Instagram

Do it online

Search & reserve

Login & renew

eLibrary

Get a library card

Support your library

We're a charity that makes life in Suffolk better for thousands of people.

Donate

Contact us

01473 351249

help@suffolklibraries.co.uk

Social media

Facebook

YouTube

Twitter

Instagram

LinkedIn

Email newsletter

Sections

eLibrary

Libraries

Mobile & home service

Help using the service

Recommendations & reviews

Events & activities

Research & reference

Parents, carers & children

Teachers & home educators

Health & wellbeing

Help with reading & literacy

Work & benefits

Business & room hire

BLOC

Music & Drama Library

News

Jobs

Volunteering

About us

Privacy & cookies

Find out what cookies we use and how we use your data: our privacy policies.

Privacy notice for job applicants

Suffolk Libraries HMRC charity number XT34476. Registered company number IP031542.


text:
package org.apache.ofbiz.accounting.thirdparty.cybersource;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;

import org.apache.ofbiz.accounting.payment.PaymentGatewayServices;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.SSLUtil;
import org.apache.ofbiz.base.util.StringUtil;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilMisc;
import org.apache.ofbiz.base.util.UtilNumber;
import org.apache.ofbiz.base.util.UtilProperties;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.string.FlexibleStringExpander;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericEntityException;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.service.DispatchContext;
import org.apache.ofbiz.service.ServiceUtil;

import com.cybersource.ws.client.Client;
import com.cybersource.ws.client.ClientException;
import com.cybersource.ws.client.FaultException;

/**
 * CyberSource WS Integration Services
 */
public class IcsPaymentServices {

    public static final String module = IcsPaymentServices.class.getName();
    private static int decimals = UtilNumber.getBigDecimalScale("invoice.decimals");
    private static int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
    public final static String resource = "AccountingUiLabels";

    // load the JSSE properties
    static {
        SSLUtil.loadJsseProperties();
    }

    public static Map<String, Object> ccAuth(DispatchContext dctx, Map<String, ? extends Object> context) {
        Delegator delegator = dctx.getDelegator();
        Locale locale = (Locale) context.get("locale");
        // generate the request/properties
        Properties props = buildCsProperties(context, delegator);
        if (props == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorGettingPaymentGatewayConfig", locale));
        }

        Map<String, Object> request = buildAuthRequest(context, delegator);
        request.put("merchantID", props.get("merchantID"));

        // transmit the request
        Map<String, Object> reply;
        try {
            reply = UtilGenerics.cast(Client.runTransaction(request, props));
        } catch (FaultException e) {
            Debug.logError(e, "ERROR: Fault from CyberSource", module);
            Debug.logError(e, "Fault : " + e.getFaultString(), module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        } catch (ClientException e) {
            Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        }
        // process the reply
        Map<String, Object> result = ServiceUtil.returnSuccess();
        processAuthResult(reply, result, delegator);
        return result;
    }

    public static Map<String, Object> ccReAuth(DispatchContext dctx, Map<String, ? extends Object> context) {
        return ServiceUtil.returnSuccess();
    }

    public static Map<String, Object> ccCapture(DispatchContext dctx, Map<String, ? extends Object> context) {
        Delegator delegator = dctx.getDelegator();
        GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
        //lets see if there is a auth transaction already in context
        GenericValue authTransaction = (GenericValue) context.get("authTrans");
        Locale locale = (Locale) context.get("locale");
        if (authTransaction == null) {
            authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
        }
        if (authTransaction == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingPaymentTransactionAuthorizationNotFoundCannotCapture", locale));
        }
        // generate the request/properties
        Properties props = buildCsProperties(context, delegator);
        if (props == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorGettingPaymentGatewayConfig", locale));
        }

        Map<String, Object> request = buildCaptureRequest(context, authTransaction, delegator);
        request.put("merchantID", props.get("merchantID"));

        // transmit the request
        Map<String, Object> reply;
        try {
            reply = UtilGenerics.cast(Client.runTransaction(request, props));
        } catch (FaultException e) {
            Debug.logError(e, "ERROR: Fault from CyberSource", module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        } catch (ClientException e) {
            Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        }
        // process the reply
        Map<String, Object> result = ServiceUtil.returnSuccess();
        processCaptureResult(reply, result);
        return result;
    }

    public static Map<String, Object> ccRelease(DispatchContext dctx, Map<String, ? extends Object> context) {
        Delegator delegator = dctx.getDelegator();
        GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
        Locale locale = (Locale) context.get("locale");
        GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
        if (authTransaction == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingPaymentTransactionAuthorizationNotFoundCannotRelease", locale));
        }

        // generate the request/properties
        Properties props = buildCsProperties(context, delegator);
        if (props == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorGettingPaymentGatewayConfig", locale));
        }

        Map<String, Object> request = buildReleaseRequest(context, authTransaction);
        request.put("merchantID", props.get("merchantID"));

        // transmit the request
        Map<String, Object> reply;
        try {
            reply = UtilGenerics.cast(Client.runTransaction(request, props));
        } catch (FaultException e) {
            Debug.logError(e, "ERROR: Fault from CyberSource", module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        } catch (ClientException e) {
            Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        }
        // process the reply
        Map<String, Object> result = ServiceUtil.returnSuccess();
        processReleaseResult(reply, result);
        return result;
    }

    public static Map<String, Object> ccRefund(DispatchContext dctx, Map<String, ? extends Object> context) {
        Delegator delegator = dctx.getDelegator();
        GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
        Locale locale = (Locale) context.get("locale");
        GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
        if (authTransaction == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingPaymentTransactionAuthorizationNotFoundCannotRefund", locale));
        }

        // generate the request/properties
        Properties props = buildCsProperties(context, delegator);
        if (props == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorGettingPaymentGatewayConfig", locale));
        }

        Map<String, Object> request = buildRefundRequest(context, authTransaction, delegator);
        request.put("merchantID", props.get("merchantID"));

        // transmit the request
        Map<String, Object> reply;
        try {
            reply = UtilGenerics.cast(Client.runTransaction(request, props));
        } catch (FaultException e) {
            Debug.logError(e, "ERROR: Fault from CyberSource", module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        } catch (ClientException e) {
            Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        }

        // process the reply
        Map<String, Object> result = ServiceUtil.returnSuccess();
        processRefundResult(reply, result);
        return result;
    }

    public static Map<String, Object> ccCredit(DispatchContext dctx, Map<String, ? extends Object> context) {
        Delegator delegator = dctx.getDelegator();
        Locale locale = (Locale) context.get("locale");
        // generate the request/properties
        Properties props = buildCsProperties(context, delegator);
        if (props == null) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorGettingPaymentGatewayConfig", locale));
        }

        Map<String, Object> request = buildCreditRequest(context);
        request.put("merchantID", props.get("merchantID"));

        // transmit the request
        Map<String, Object> reply;
        try {
            reply = UtilGenerics.cast(Client.runTransaction(request, props));
        } catch (FaultException e) {
            Debug.logError(e, "ERROR: Fault from CyberSource", module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        } catch (ClientException e) {
            Debug.logError(e, "ERROR: CyberSource Client exception : " + e.getMessage(), module);
            return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                    "AccountingCyberSourceErrorCommunicateWithCyberSource", locale));
        }

        // process the reply
        Map<String, Object> result = ServiceUtil.returnSuccess();
        processCreditResult(reply, result);
        return result;
    }

    private static Properties buildCsProperties(Map<String, ? extends Object> context, Delegator delegator) {
        String paymentGatewayConfigId = (String) context.get("paymentGatewayConfigId");
        String configString = (String) context.get("paymentConfig");
        if (configString == null) {
            configString = "payment.properties";
        }
        String merchantId = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantId", configString, "payment.cybersource.merchantID");
        String targetApi = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "apiVersion", configString, "payment.cybersource.api.version");
        String production = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "production", configString, "payment.cybersource.production");
        String enableLog = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "logEnabled", configString, "payment.cybersource.log");
        String logSize = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "logSize", configString, "payment.cybersource.log.size");
        String logFile = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "logFile", configString, "payment.cybersource.log.file");
        String logDir = FlexibleStringExpander.expandString(getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "logDir", configString, "payment.cybersource.log.dir"), context);
        String keysDir = FlexibleStringExpander.expandString(getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "keysDir", configString, "payment.cybersource.keysDir"), context);
        String keysFile = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "keysFile", configString, "payment.cybersource.keysFile");
        // some property checking
        if (UtilValidate.isEmpty(merchantId)) {
            Debug.logWarning("The merchantId property is not configured", module);
            return null;
        }
        if (UtilValidate.isEmpty(keysDir)) {
            Debug.logWarning("The keysDir property is not configured", module);
            return null;
        }
        // create some properties for CS Client
        Properties props = new Properties();
        props.put("merchantID", merchantId);
        props.put("keysDirectory", keysDir);
        props.put("targetAPIVersion", targetApi);
        props.put("sendToProduction", production);
        props.put("enableLog", enableLog);
        props.put("logDirectory", logDir);
        props.put("logFilename", logFile);
        props.put("logMaximumSize", logSize);
        if (UtilValidate.isNotEmpty(keysFile)) {
            props.put("alternateKeyFilename", keysFile);
        }
        Debug.logInfo("Created CyberSource Properties : " + props, module);
        return props;
    }

    private static Map<String, Object> buildAuthRequest(Map<String, ? extends Object> context, Delegator delegator) {
        String paymentGatewayConfigId = (String) context.get("paymentGatewayConfigId");
        String configString = (String) context.get("paymentConfig");
        String currency = (String) context.get("currency");
        if (configString == null) {
            configString = "payment.properties";
        }
        // make the request map
        String capture = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "autoBill", configString, "payment.cybersource.autoBill", "false");
        String orderId = (String) context.get("orderId");
        Map<String, Object> request = new HashMap<String, Object>();
        request.put("ccAuthService_run", "true");              // run auth service
        request.put("ccCaptureService_run", capture);          // run capture service (i.e. sale)
        request.put("merchantReferenceCode", orderId);         // set the order ref number
        request.put("purchaseTotals_currency", currency);      // set the order currency
        appendFullBillingInfo(request, context);               // add in all address info
        appendItemLineInfo(request, context, "processAmount"); // add in the item info
        appendAvsRules(request, context, delegator);           // add in the AVS flags and decline codes
        return request;
    }

    private static Map<String, Object> buildCaptureRequest(Map<String, ? extends Object> context, GenericValue authTransaction, Delegator delegator) {
        GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
        String paymentGatewayConfigId = (String) context.get("paymentGatewayConfigId");
        String configString = (String) context.get("paymentConfig");
        String currency = (String) context.get("currency");
        if (configString == null) {
            configString = "payment.properties";
        }
        String merchantDesc = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantDescr", configString, "payment.cybersource.merchantDescr", null);
        String merchantCont = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantContact", configString, "payment.cybersource.merchantContact", null);
        Map<String, Object> request = new HashMap<String, Object>();
        request.put("ccCaptureService_run", "true");
        request.put("ccCaptureService_authRequestID", authTransaction.getString("referenceNum"));
        request.put("item_0_unitPrice", getAmountString(context, "captureAmount"));
        request.put("merchantReferenceCode", orderPaymentPreference.getString("orderId"));
        request.put("purchaseTotals_currency", currency);

        // TODO: add support for verbal authorizations
        if (merchantDesc != null) {
            request.put("invoiceHeader_merchantDescriptor", merchantDesc);        // merchant description
        }
        if (merchantCont != null) {
            request.put("invoiceHeader_merchantDescriptorContact", merchantCont); // merchant contact info
        }
        return request;
    }

    private static Map<String, Object> buildReleaseRequest(Map<String, ? extends Object> context, GenericValue authTransaction) {
        Map<String, Object> request = new HashMap<String, Object>();
        GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
        String currency = (String) context.get("currency");
        request.put("ccAuthReversalService_run", "true");
        request.put("ccAuthReversalService_authRequestID", authTransaction.getString("referenceNum"));
        request.put("item_0_unitPrice", getAmountString(context, "releaseAmount"));
        request.put("merchantReferenceCode", orderPaymentPreference.getString("orderId"));
        request.put("purchaseTotals_currency", currency);
        return request;
    }

    private static Map<String, Object> buildRefundRequest(Map<String, ? extends Object> context, GenericValue authTransaction, Delegator delegator) {
        GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
        String paymentGatewayConfigId = (String) context.get("paymentGatewayConfigId");
        String configString = (String) context.get("paymentConfig");
        if (configString == null) {
            configString = "payment.properties";
        }
        String currency = (String) context.get("currency");
        String merchantDesc = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantDescr", configString, "payment.cybersource.merchantDescr", null);
        String merchantCont = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "merchantContact", configString, "payment.cybersource.merchantContact", null);
        Map<String, Object> request = new HashMap<String, Object>();
        request.put("ccCreditService_run", "true");
        request.put("ccCreditService_captureRequestID", authTransaction.getString("referenceNum"));
        request.put("item_0_unitPrice", getAmountString(context, "refundAmount"));
        request.put("merchantReferenceCode", orderPaymentPreference.getString("orderId"));
        request.put("purchaseTotals_currency", currency);
        if (merchantDesc != null) {
            request.put("invoiceHeader_merchantDescriptor", merchantDesc);        // merchant description
        }
        if (merchantCont != null) {
            request.put("invoiceHeader_merchantDescriptorContact", merchantCont); // merchant contact info
        }
        return request;
    }

    private static Map<String, Object> buildCreditRequest(Map<String, ? extends Object> context) {
        String refCode = (String) context.get("referenceCode");
        Map<String, Object> request = new HashMap<String, Object>();
        request.put("ccCreditService_run", "true");            // run credit service
        request.put("merchantReferenceCode", refCode);         // set the ref number could be order id
        appendFullBillingInfo(request, context);               // add in all address info
        appendItemLineInfo(request, context, "creditAmount");  // add in the item info
        return request;
    }

    private static void appendAvsRules(Map<String, Object> request, Map<String, ? extends Object> context, Delegator delegator) {
        String paymentGatewayConfigId = (String) context.get("paymentGatewayConfigId");
        String configString = (String) context.get("paymentConfig");
        if (configString == null) {
            configString = "payment.properties";
        }
        String avsCodes = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "avsDeclineCodes", configString, "payment.cybersource.avsDeclineCodes", null);
        GenericValue party = (GenericValue) context.get("billToParty");
        if (party != null) {
            GenericValue avsOverride = null;
            try {
                avsOverride = party.getDelegator().findOne("PartyIcsAvsOverride",
                        UtilMisc.toMap("partyId", party.getString("partyId")), false);
            } catch (GenericEntityException e) {
                Debug.logError(e, module);
            }
            if (avsOverride != null && avsOverride.get("avsDeclineString") != null) {
                String overrideString = avsOverride.getString("avsDeclineString");
                if (UtilValidate.isNotEmpty(overrideString)) {
                    avsCodes = overrideString;
                }
            }
        }
        if (UtilValidate.isNotEmpty(avsCodes)) {
            request.put("businessRules_declineAVSFlags", avsCodes);
        }
        String avsIgnore = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "ignoreAvs", configString, "payment.cybersource.ignoreAvs", "false");
        request.put("businessRules_ignoreAVS", avsIgnore);
    }

    private static void appendFullBillingInfo(Map<String, Object> request, Map<String, ? extends Object> context) {
        // contact info
        GenericValue email = (GenericValue) context.get("billToEmail");
        if (email != null) {
            request.put("billTo_email", email.getString("infoString"));
        } else {
            Debug.logWarning("Email not defined; Cybersource will fail.", module);
        }
        // phone number seems to not be used; possibly only for reporting.

        // CC payment info
        GenericValue creditCard = (GenericValue) context.get("creditCard");
        if (creditCard != null) {
            List<String> expDateList = StringUtil.split(creditCard.getString("expireDate"), "/");
            request.put("billTo_firstName", creditCard.getString("firstNameOnCard"));
            request.put("billTo_lastName", creditCard.getString("lastNameOnCard"));
            request.put("card_accountNumber", creditCard.getString("cardNumber"));
            request.put("card_expirationMonth", expDateList.get(0));
            request.put("card_expirationYear", expDateList.get(1));
        } else {
            Debug.logWarning("CreditCard not defined; Cybersource will fail.", module);
        }
        // CCV info
        String cvNum = (String) context.get("cardSecurityCode");
        String cvSet = UtilValidate.isEmpty(cvNum) ? "1" : "0";
        request.put("card_cvIndicator", cvSet);
        if ("1".equals(cvNum)) {
            request.put("card_cvNumber", cvNum);
        }
        // payment contact info
        GenericValue billingAddress = (GenericValue) context.get("billingAddress");

        if (billingAddress != null) {
            request.put("billTo_street1", billingAddress.getString("address1"));
            if (billingAddress.get("address2") != null) {
                request.put("billTo_street2", billingAddress.getString("address2"));
            }
            request.put("billTo_city", billingAddress.getString("city"));
            String bCountry = billingAddress.get("countryGeoId") != null ? billingAddress.getString("countryGeoId") : "USA";
            request.put("billTo_country", bCountry);
            request.put("billTo_postalCode", billingAddress.getString("postalCode"));
            if (billingAddress.get("stateProvinceGeoId") != null) {
                request.put("billTo_state", billingAddress.getString("stateProvinceGeoId"));
            }
        } else {
            Debug.logWarning("BillingAddress not defined; Cybersource will fail.", module);
        }
        // order shipping information
        GenericValue shippingAddress = (GenericValue) context.get("shippingAddress");
        if (shippingAddress != null) {
            if (creditCard != null) {
                // TODO: this is just a kludge since we don't have a firstName and lastName on the PostalAddress entity, that needs to be done
                request.put("shipTo_firstName", creditCard.getString("firstNameOnCard"));
                request.put("shipTo_lastName", creditCard.getString("lastNameOnCard"));
            }
            request.put("shipTo_street1", shippingAddress.getString("address1"));
            if (shippingAddress.get("address2") != null) {
                request.put("shipTo_street2", shippingAddress.getString("address2"));
            }
            request.put("shipTo_city", shippingAddress.getString("city"));
            String sCountry = shippingAddress.get("countryGeoId") != null ? shippingAddress.getString("countryGeoId") : "USA";
            request.put("shipTo_country", sCountry);
            request.put("shipTo_postalCode", shippingAddress.getString("postalCode"));
            if (shippingAddress.get("stateProvinceGeoId") != null) {
                request.put("shipTo_state", shippingAddress.getString("stateProvinceGeoId"));
            }
        }
    }

    private static void appendItemLineInfo(Map<String, Object> request, Map<String, ? extends Object> context, String amountField) {
        // send over a line item total offer w/ the total for billing; don't trust CyberSource for calc
        String currency = (String) context.get("currency");
        int lineNumber = 0;
        request.put("item_" + lineNumber + "_unitPrice", getAmountString(context, amountField));
        // the currency
        request.put("purchaseTotals_currency", currency);
        // create the offers (one for each line item)
        List<GenericValue> orderItems = UtilGenerics.cast(context.get("orderItems"));
        if (orderItems != null) {
            for (Object orderItem : orderItems) {
                lineNumber++;
                GenericValue item = (GenericValue) orderItem;
                GenericValue product = null;
                try {
                    product = item.getRelatedOne("Product", false);
                } catch (GenericEntityException e) {
                    Debug.logError(e, "ERROR: Unable to get Product from OrderItem, not passing info to CyberSource");
                }
                if (product != null) {
                    request.put("item_" + lineNumber + "_productName", product.getString("productName"));
                    request.put("item_" + lineNumber + "_productSKU", product.getString("productId"));
                } else {
                    // no product; just send the item description -- non product items
                    request.put("item_" + lineNumber + "_productName", item.getString("description"));
                }
                // get the quantity..
                BigDecimal quantity = item.getBigDecimal("quantity");
                // test quantity if INT pass as is; if not pass as 1
                if (quantity.scale() > 0) {
                    request.put("item_" + lineNumber + "_quantity", "1");
                } else {
                    request.put("", Integer.toString(quantity.intValue()));
                }
                // set the amount to 0.0000 -- we will send a total too.
                request.put("item_" + lineNumber + "_unitPrice", "0.0000");
            }
        }
    }

    private static String getAmountString(Map<String, ? extends Object> context, String amountField) {
        BigDecimal processAmount = (BigDecimal) context.get(amountField);
        return processAmount.setScale(decimals, rounding).toPlainString();
    }

    private static void processAuthResult(Map<String, Object> reply, Map<String, Object> result, Delegator delegator) {
        String decision = getDecision(reply);
        String checkModeStatus = EntityUtilProperties.getPropertyValue("payment", "payment.cybersource.ignoreStatus", delegator);
        if ("ACCEPT".equalsIgnoreCase(decision)) {
            result.put("authCode", reply.get("ccAuthReply_authorizationCode"));
            result.put("authResult", Boolean.TRUE);
        } else {
            result.put("authCode", decision);
            if ("N".equals(checkModeStatus)) {
                result.put("authResult", Boolean.FALSE);
            } else {
                result.put("authResult", Boolean.TRUE);
            }
            // TODO: based on reasonCode populate the following flags as applicable: resultDeclined, resultNsf, resultBadExpire, resultBadCardNumber
        }

        if (reply.get("ccAuthReply_amount") != null) {
            result.put("processAmount", new BigDecimal((String) reply.get("ccAuthReply_amount")));
        } else {
            result.put("processAmount", BigDecimal.ZERO);
        }
        result.put("authRefNum", reply.get("requestID"));
        result.put("authFlag", reply.get("ccAuthReply_reasonCode"));
        result.put("authMessage", reply.get("ccAuthReply_processorResponse"));
        result.put("cvCode", reply.get("ccAuthReply_cvCode"));
        result.put("avsCode", reply.get("ccAuthReply_avsCode"));
        result.put("scoreCode", reply.get("ccAuthReply_authFactorCode"));
        result.put("captureRefNum", reply.get("requestID"));
        if (UtilValidate.isNotEmpty(reply.get("ccCaptureReply_reconciliationID"))) {
            if ("ACCEPT".equalsIgnoreCase(decision)) {
                result.put("captureResult", Boolean.TRUE);
            } else {
                result.put("captureResult", Boolean.FALSE);
            }
            result.put("captureCode", reply.get("ccCaptureReply_reconciliationID"));
            result.put("captureFlag", reply.get("ccCaptureReply_reasonCode"));
            result.put("captureMessage", reply.get("decision"));
        }
        if (Debug.infoOn())
            Debug.logInfo("CC [Cybersource] authorization result : " + result, module);
    }

    private static void processCaptureResult(Map<String, Object> reply, Map<String, Object> result) {
        String decision = getDecision(reply);
        if ("ACCEPT".equalsIgnoreCase(decision)) {
            result.put("captureResult", Boolean.TRUE);
        } else {
            result.put("captureResult", Boolean.FALSE);
        }
        if (reply.get("ccCaptureReply_amount") != null) {
            result.put("captureAmount", new BigDecimal((String) reply.get("ccCaptureReply_amount")));
        } else {
            result.put("captureAmount", BigDecimal.ZERO);
        }
        result.put("captureRefNum", reply.get("requestID"));
        result.put("captureCode", reply.get("ccCaptureReply_reconciliationID"));
        result.put("captureFlag", reply.get("ccCaptureReply_reasonCode"));
        result.put("captureMessage", reply.get("decision"));
        if (Debug.infoOn())
            Debug.logInfo("CC [Cybersource] capture result : " + result, module);
    }

    private static void processReleaseResult(Map<String, Object> reply, Map<String, Object> result) {
        String decision = getDecision(reply);
        if ("ACCEPT".equalsIgnoreCase(decision)) {
            result.put("releaseResult", Boolean.TRUE);
        } else {
            result.put("releaseResult", Boolean.FALSE);
        }
        if (reply.get("ccAuthReversalReply_amount") != null) {
            result.put("releaseAmount", new BigDecimal((String) reply.get("ccAuthReversalReply_amount")));
        } else {
            result.put("releaseAmount", BigDecimal.ZERO);
        }
        result.put("releaseRefNum", reply.get("requestID"));
        result.put("releaseCode", reply.get("ccAuthReversalReply_reasonCode"));
        result.put("releaseFlag", reply.get("reasonCode"));
        result.put("releaseMessage", reply.get("decision"));
        if (Debug.infoOn())
            Debug.logInfo("CC [Cybersource] release result : " + result, module);
    }

    private static void processRefundResult(Map<String, Object> reply, Map<String, Object> result) {
        String decision = getDecision(reply);
        if ("ACCEPT".equalsIgnoreCase(decision)) {
            result.put("refundResult", Boolean.TRUE);
        } else {
            result.put("refundResult", Boolean.FALSE);
        }
        if (reply.get("ccCreditReply_amount") != null) {
            result.put("refundAmount", new BigDecimal((String) reply.get("ccCreditReply_amount")));
        } else {
            result.put("refundAmount", BigDecimal.ZERO);
        }
        result.put("refundRefNum", reply.get("requestID"));
        result.put("refundCode", reply.get("ccCreditReply_reconciliationID"));
        result.put("refundFlag", reply.get("ccCreditReply_reasonCode"));
        result.put("refundMessage", reply.get("decision"));
        if (Debug.infoOn())
            Debug.logInfo("CC [Cybersource] refund result : " + result, module);
    }

    private static void processCreditResult(Map<String, Object> reply, Map<String, Object> result) {
        String decision = (String) reply.get("decision");
        if ("ACCEPT".equalsIgnoreCase(decision)) {
            result.put("creditResult", Boolean.TRUE);
        } else {
            result.put("creditResult", Boolean.FALSE);
        }

        if (reply.get("ccCreditReply_amount") != null) {
            result.put("creditAmount", new BigDecimal((String) reply.get("ccCreditReply_amount")));
        } else {
            result.put("creditAmount", BigDecimal.ZERO);
        }

        result.put("creditRefNum", reply.get("requestID"));
        result.put("creditCode", reply.get("ccCreditReply_reconciliationID"));
        result.put("creditFlag", reply.get("ccCreditReply_reasonCode"));
        result.put("creditMessage", reply.get("decision"));
        if (Debug.infoOn())
            Debug.logInfo("CC [Cybersource] credit result : " + result, module);
    }

    private static String getDecision(Map<String, Object> reply) {
        String decision = (String) reply.get("decision");
        String reasonCode = (String) reply.get("reasonCode");
        if (!"ACCEPT".equalsIgnoreCase(decision)) {
            Debug.logInfo("CyberSource : " + decision + " (" + reasonCode + ")", module);
            Debug.logInfo("Reply Dump : " + reply, module);
        }
        return decision;
    }

    private static String getPaymentGatewayConfigValue(Delegator delegator, String paymentGatewayConfigId, String paymentGatewayConfigParameterName,
                                                       String resource, String parameterName) {
        String returnValue = "";
        if (UtilValidate.isNotEmpty(paymentGatewayConfigId)) {
            try {
                GenericValue cyberSource = EntityQuery.use(delegator).from("PaymentGatewayCyberSource").where("paymentGatewayConfigId", paymentGatewayConfigId).queryOne();
                if (cyberSource != null) {
                    Object cyberSourceField = cyberSource.get(paymentGatewayConfigParameterName);
                    if (cyberSourceField != null) {
                        returnValue = cyberSourceField.toString().trim();
                    }
                }
            } catch (GenericEntityException e) {
                Debug.logError(e, module);
            }
        } else {
            String value = EntityUtilProperties.getPropertyValue(resource, parameterName, delegator);
            if (value != null) {
                returnValue = value.trim();
            }
        }
        return returnValue;
    }

    private static String getPaymentGatewayConfigValue(Delegator delegator, String paymentGatewayConfigId, String paymentGatewayConfigParameterName,
                                                       String resource, String parameterName, String defaultValue) {
        String returnValue = getPaymentGatewayConfigValue(delegator, paymentGatewayConfigId, paymentGatewayConfigParameterName, resource, parameterName);
        if (UtilValidate.isEmpty(returnValue)) {
            returnValue = defaultValue;
        }
        return returnValue;
    }
}


text:
package com.amazonaws.services.inspector.model.transform;

import static com.amazonaws.util.StringUtils.UTF8;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Map;
import java.util.List;

import com.amazonaws.AmazonClientException;
import com.amazonaws.services.inspector.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.IdempotentUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;

/**
 * AgentsFilterMarshaller
 */
public class AgentsFilterJsonMarshaller {

    /**
     * Marshall the given parameter object, and output to a SdkJsonGenerator
     */
    public void marshall(AgentsFilter agentsFilter,
            SdkJsonGenerator jsonGenerator) {
        if (agentsFilter == null) {
            throw new AmazonClientException(
                    "Invalid argument passed to marshall(...)");
        }

        try {
            jsonGenerator.writeStartObject();

            java.util.List<String> agentHealthListList = agentsFilter
                    .getAgentHealthList();
            if (agentHealthListList != null) {
                jsonGenerator.writeFieldName("agentHealthList");
                jsonGenerator.writeStartArray();
                for (String agentHealthListListValue : agentHealthListList) {
                    if (agentHealthListListValue != null) {
                        jsonGenerator.writeValue(agentHealthListListValue);
                    }
                }
                jsonGenerator.writeEndArray();
            }

            jsonGenerator.writeEndObject();
        } catch (Throwable t) {
            throw new AmazonClientException(
                    "Unable to marshall request to JSON: " + t.getMessage(), t);
        }
    }

    private static AgentsFilterJsonMarshaller instance;

    public static AgentsFilterJsonMarshaller getInstance() {
        if (instance == null)
            instance = new AgentsFilterJsonMarshaller();
        return instance;
    }

}


text:
package org.diirt.vtype;

import java.util.List;

/**
 * Multi channel array.
 *

 * This same type can be used in multiple circumstances where data is collected,
 * regardless of how and what of data. The number of values in the multi channel
 * array never changes.
 *

 *
Synchronized array: {@link Time} returns the reference
 * time of the collected data); each element may or may not retain
 * its time information.

 *
Multi channel: {@link Time} returns the time of the data generation;
 * each element may or may not retain its time information

 *

 *

 * A {@link MultiScalar} can be automatically converted to a {@link Array} of the
 * same type.
 *
 * @param <T> the type for the multi channel values
 * @author carcassi
 */
public interface MultiScalar<T extends Scalar> {

    /**
     * The list of values for all the different channels. Never null.
     *
     * @return a {@link List} of values
     */
    List<T> getValues();
}