text:
package uk.org.whoami.authme.settings;

import java.io.File;
import java.util.HashMap;

import org.bukkit.util.config.Configuration;

public class Messages extends Configuration {

    private static Messages singleton = null;
    private HashMap<String, String> map;

    private Messages() {
        super(new File(Settings.MESSAGE_FILE));
        map = new HashMap<String, String>();
        loadDefaults();
        loadFile();
    }

    private void loadDefaults() {
        map.put("logged_in", "&cAlready logged in!");
        map.put("not_logged_in", "&cNot logged in!");
        map.put("reg_disabled", "&cRegistration is disabled");
        map.put("user_regged", "&cUsername already registered");
        map.put("usage_reg", "&cUsage: /register password");
        map.put("usage_log", "&cUsage: /login password");
        map.put("user_unknown", "&cUsername not registered");
        map.put("pwd_changed", "&cPassword changed!");
        map.put("reg_only", "Registered players only! Please visit http://example.com to register");
        map.put("valid_session", "&cSession login");
        map.put("login_msg", "&cPlease login with \"/login password\"");
        map.put("reg_msg", "&cPlease register with \"/register password\"");
        map.put("timeout", "Login Timeout");
        map.put("wrong_pwd", "&cWrong password");
        map.put("logout", "&cSuccessful logout");
        map.put("usage_unreg", "&cUsage: /unregister password");
        map.put("registered", "&cSuccessfully registered!");
        map.put("unregistered", "&cSuccessfully unregistered!");
        map.put("login", "&cSuccessful login!");
        map.put("no_perm", "&cNo Permission");
        map.put("same_nick", "Same nick is already playing");
        map.put("reg_voluntarily", "You can register your nickname with the server with the command \"/register password\"");
        map.put("reload", "Configuration and database has been reloaded");
        map.put("error", "An error ocurred; Please contact the admin");
        map.put("unknown_user", "User is not in database");
    }

    private void loadFile() {
        this.load();
        for (String key : map.keySet()) {
            if (this.getString(key) == null) {
                this.setProperty(key, map.get(key));
            } else {
                map.put(key, this.getString(key));
            }
        }
        this.save();
    }

    public String _(String msg) {
        String loc = map.get(msg);
        if (loc != null) {
            return loc.replace("&", "\u00a7");
        }
        return msg;
    }

    public void reload() {
        loadFile();
    }

    public static Messages getInstance() {
        if (singleton == null) {
            singleton = new Messages();
        }
        return singleton;
    }
}


text:
package monitoring

import (
	"context"
	"fmt"
	"math"
	"net/url"
	"time"

	gax "github.com/googleapis/gax-go/v2"
	"google.golang.org/api/iterator"
	"google.golang.org/api/option"
	"google.golang.org/api/option/internaloption"
	gtransport "google.golang.org/api/transport/grpc"
	monitoringpb "google.golang.org/genproto/googleapis/monitoring/v3"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/metadata"
	"google.golang.org/protobuf/proto"
)

var newAlertPolicyClientHook clientHook

// AlertPolicyCallOptions contains the retry settings for each method of AlertPolicyClient.
type AlertPolicyCallOptions struct {
	ListAlertPolicies []gax.CallOption
	GetAlertPolicy    []gax.CallOption
	CreateAlertPolicy []gax.CallOption
	DeleteAlertPolicy []gax.CallOption
	UpdateAlertPolicy []gax.CallOption
}

func defaultAlertPolicyGRPCClientOptions() []option.ClientOption {
	return []option.ClientOption{
		internaloption.WithDefaultEndpoint("monitoring.googleapis.com:443"),
		internaloption.WithDefaultMTLSEndpoint("monitoring.mtls.googleapis.com:443"),
		internaloption.WithDefaultAudience("https://monitoring.googleapis.com/"),
		internaloption.WithDefaultScopes(DefaultAuthScopes()...),
		internaloption.EnableJwtWithScope(),
		option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
			grpc.MaxCallRecvMsgSize(math.MaxInt32))),
	}
}

func defaultAlertPolicyCallOptions() *AlertPolicyCallOptions {
	return &AlertPolicyCallOptions{
		ListAlertPolicies: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        30000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		GetAlertPolicy: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        30000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		CreateAlertPolicy: []gax.CallOption{},
		DeleteAlertPolicy: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        30000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		UpdateAlertPolicy: []gax.CallOption{},
	}
}

// internalAlertPolicyClient is an interface that defines the methods availaible from Cloud Monitoring API.
type internalAlertPolicyClient interface {
	Close() error
	setGoogleClientInfo(...string)
	Connection() *grpc.ClientConn
	ListAlertPolicies(context.Context, *monitoringpb.ListAlertPoliciesRequest, ...gax.CallOption) *AlertPolicyIterator
	GetAlertPolicy(context.Context, *monitoringpb.GetAlertPolicyRequest, ...gax.CallOption) (*monitoringpb.AlertPolicy, error)
	CreateAlertPolicy(context.Context, *monitoringpb.CreateAlertPolicyRequest, ...gax.CallOption) (*monitoringpb.AlertPolicy, error)
	DeleteAlertPolicy(context.Context, *monitoringpb.DeleteAlertPolicyRequest, ...gax.CallOption) error
	UpdateAlertPolicy(context.Context, *monitoringpb.UpdateAlertPolicyRequest, ...gax.CallOption) (*monitoringpb.AlertPolicy, error)
}

// AlertPolicyClient is a client for interacting with Cloud Monitoring API.
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
//
// The AlertPolicyService API is used to manage (list, create, delete,
// edit) alert policies in Stackdriver Monitoring. An alerting policy is
// a description of the conditions under which some aspect of your
// system is considered to be "unhealthy" and the ways to notify
// people or services about this state. In addition to using this API, alert
// policies can also be managed through
// Stackdriver Monitoring (at https://cloud.google.com/monitoring/docs/),
// which can be reached by clicking the "Monitoring" tab in
// Cloud Console (at https://console.cloud.google.com/).
type AlertPolicyClient struct {
	// The internal transport-dependent client.
	internalClient internalAlertPolicyClient

	// The call options for this service.
	CallOptions *AlertPolicyCallOptions
}

// Wrapper methods routed to the internal client.

// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *AlertPolicyClient) Close() error {
	return c.internalClient.Close()
}

// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *AlertPolicyClient) setGoogleClientInfo(keyval ...string) {
	c.internalClient.setGoogleClientInfo(keyval...)
}

// Connection returns a connection to the API service.
//
// Deprecated.
func (c *AlertPolicyClient) Connection() *grpc.ClientConn {
	return c.internalClient.Connection()
}

// ListAlertPolicies lists the existing alerting policies for the workspace.
func (c *AlertPolicyClient) ListAlertPolicies(ctx context.Context, req *monitoringpb.ListAlertPoliciesRequest, opts ...gax.CallOption) *AlertPolicyIterator {
	return c.internalClient.ListAlertPolicies(ctx, req, opts...)
}

// GetAlertPolicy gets a single alerting policy.
func (c *AlertPolicyClient) GetAlertPolicy(ctx context.Context, req *monitoringpb.GetAlertPolicyRequest, opts ...gax.CallOption) (*monitoringpb.AlertPolicy, error) {
	return c.internalClient.GetAlertPolicy(ctx, req, opts...)
}

// CreateAlertPolicy creates a new alerting policy.
func (c *AlertPolicyClient) CreateAlertPolicy(ctx context.Context, req *monitoringpb.CreateAlertPolicyRequest, opts ...gax.CallOption) (*monitoringpb.AlertPolicy, error) {
	return c.internalClient.CreateAlertPolicy(ctx, req, opts...)
}

// DeleteAlertPolicy deletes an alerting policy.
func (c *AlertPolicyClient) DeleteAlertPolicy(ctx context.Context, req *monitoringpb.DeleteAlertPolicyRequest, opts ...gax.CallOption) error {
	return c.internalClient.DeleteAlertPolicy(ctx, req, opts...)
}

// UpdateAlertPolicy updates an alerting policy. You can either replace the entire policy with
// a new one or replace only certain fields in the current alerting policy by
// specifying the fields to be updated via updateMask. Returns the
// updated alerting policy.
func (c *AlertPolicyClient) UpdateAlertPolicy(ctx context.Context, req *monitoringpb.UpdateAlertPolicyRequest, opts ...gax.CallOption) (*monitoringpb.AlertPolicy, error) {
	return c.internalClient.UpdateAlertPolicy(ctx, req, opts...)
}

// alertPolicyGRPCClient is a client for interacting with Cloud Monitoring API over gRPC transport.
//
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
type alertPolicyGRPCClient struct {
	// Connection pool of gRPC connections to the service.
	connPool gtransport.ConnPool

	// flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE
	disableDeadlines bool

	// Points back to the CallOptions field of the containing AlertPolicyClient
	CallOptions **AlertPolicyCallOptions

	// The gRPC API client.
	alertPolicyClient monitoringpb.AlertPolicyServiceClient

	// The x-goog-* metadata to be sent with each request.
	xGoogMetadata metadata.MD
}

// NewAlertPolicyClient creates a new alert policy service client based on gRPC.
// The returned client must be Closed when it is done being used to clean up its underlying connections.
//
// The AlertPolicyService API is used to manage (list, create, delete,
// edit) alert policies in Stackdriver Monitoring. An alerting policy is
// a description of the conditions under which some aspect of your
// system is considered to be "unhealthy" and the ways to notify
// people or services about this state. In addition to using this API, alert
// policies can also be managed through
// Stackdriver Monitoring (at https://cloud.google.com/monitoring/docs/),
// which can be reached by clicking the "Monitoring" tab in
// Cloud Console (at https://console.cloud.google.com/).
func NewAlertPolicyClient(ctx context.Context, opts ...option.ClientOption) (*AlertPolicyClient, error) {
	clientOpts := defaultAlertPolicyGRPCClientOptions()
	if newAlertPolicyClientHook != nil {
		hookOpts, err := newAlertPolicyClientHook(ctx, clientHookParams{})
		if err != nil {
			return nil, err
		}
		clientOpts = append(clientOpts, hookOpts...)
	}

	disableDeadlines, err := checkDisableDeadlines()
	if err != nil {
		return nil, err
	}

	connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...)
	if err != nil {
		return nil, err
	}
	client := AlertPolicyClient{CallOptions: defaultAlertPolicyCallOptions()}

	c := &alertPolicyGRPCClient{
		connPool:          connPool,
		disableDeadlines:  disableDeadlines,
		alertPolicyClient: monitoringpb.NewAlertPolicyServiceClient(connPool),
		CallOptions:       &client.CallOptions,
	}
	c.setGoogleClientInfo()

	client.internalClient = c

	return &client, nil
}

// Connection returns a connection to the API service.
//
// Deprecated.
func (c *alertPolicyGRPCClient) Connection() *grpc.ClientConn {
	return c.connPool.Conn()
}

// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *alertPolicyGRPCClient) setGoogleClientInfo(keyval ...string) {
	kv := append([]string{"gl-go", versionGo()}, keyval...)
	kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version)
	c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
}

// Close closes the connection to the API service. The user should invoke this when
// the client is no longer required.
func (c *alertPolicyGRPCClient) Close() error {
	return c.connPool.Close()
}

func (c *alertPolicyGRPCClient) ListAlertPolicies(ctx context.Context, req *monitoringpb.ListAlertPoliciesRequest, opts ...gax.CallOption) *AlertPolicyIterator {
	md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))

	ctx = insertMetadata(ctx, c.xGoogMetadata, md)
	opts = append((*c.CallOptions).ListAlertPolicies[0:len((*c.CallOptions).ListAlertPolicies):len((*c.CallOptions).ListAlertPolicies)], opts...)
	it := &AlertPolicyIterator{}
	req = proto.Clone(req).(*monitoringpb.ListAlertPoliciesRequest)
	it.InternalFetch = func(pageSize int, pageToken string) ([]*monitoringpb.AlertPolicy, string, error) {
		resp := &monitoringpb.ListAlertPoliciesResponse{}
		if pageToken != "" {
			req.PageToken = pageToken
		}
		if pageSize > math.MaxInt32 {
			req.PageSize = math.MaxInt32
		} else if pageSize != 0 {
			req.PageSize = int32(pageSize)
		}
		err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
			var err error
			resp, err = c.alertPolicyClient.ListAlertPolicies(ctx, req, settings.GRPC...)
			return err
		}, opts...)
		if err != nil {
			return nil, "", err
		}

		it.Response = resp
		return resp.GetAlertPolicies(), resp.GetNextPageToken(), nil
	}
	fetch := func(pageSize int, pageToken string) (string, error) {
		items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
		if err != nil {
			return "", err
		}
		it.items = append(it.items, items...)
		return nextPageToken, nil
	}

	it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
	it.pageInfo.MaxSize = int(req.GetPageSize())
	it.pageInfo.Token = req.GetPageToken()

	return it
}

func (c *alertPolicyGRPCClient) GetAlertPolicy(ctx context.Context, req *monitoringpb.GetAlertPolicyRequest, opts ...gax.CallOption) (*monitoringpb.AlertPolicy, error) {
	if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines {
		cctx, cancel := context.WithTimeout(ctx, 30000*time.Millisecond)
		defer cancel()
		ctx = cctx
	}
	md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))

	ctx = insertMetadata(ctx, c.xGoogMetadata, md)
	opts = append((*c.CallOptions).GetAlertPolicy[0:len((*c.CallOptions).GetAlertPolicy):len((*c.CallOptions).GetAlertPolicy)], opts...)
	var resp *monitoringpb.AlertPolicy
	err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
		var err error
		resp, err = c.alertPolicyClient.GetAlertPolicy(ctx, req, settings.GRPC...)
		return err
	}, opts...)
	if err != nil {
		return nil, err
	}
	return resp, nil
}

func (c *alertPolicyGRPCClient) CreateAlertPolicy(ctx context.Context, req *monitoringpb.CreateAlertPolicyRequest, opts ...gax.CallOption) (*monitoringpb.AlertPolicy, error) {
	if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines {
		cctx, cancel := context.WithTimeout(ctx, 30000*time.Millisecond)
		defer cancel()
		ctx = cctx
	}
	md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))

	ctx = insertMetadata(ctx, c.xGoogMetadata, md)
	opts = append((*c.CallOptions).CreateAlertPolicy[0:len((*c.CallOptions).CreateAlertPolicy):len((*c.CallOptions).CreateAlertPolicy)], opts...)
	var resp *monitoringpb.AlertPolicy
	err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
		var err error
		resp, err = c.alertPolicyClient.CreateAlertPolicy(ctx, req, settings.GRPC...)
		return err
	}, opts...)
	if err != nil {
		return nil, err
	}
	return resp, nil
}

func (c *alertPolicyGRPCClient) DeleteAlertPolicy(ctx context.Context, req *monitoringpb.DeleteAlertPolicyRequest, opts ...gax.CallOption) error {
	if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines {
		cctx, cancel := context.WithTimeout(ctx, 30000*time.Millisecond)
		defer cancel()
		ctx = cctx
	}
	md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))

	ctx = insertMetadata(ctx, c.xGoogMetadata, md)
	opts = append((*c.CallOptions).DeleteAlertPolicy[0:len((*c.CallOptions).DeleteAlertPolicy):len((*c.CallOptions).DeleteAlertPolicy)], opts...)
	err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
		var err error
		_, err = c.alertPolicyClient.DeleteAlertPolicy(ctx, req, settings.GRPC...)
		return err
	}, opts...)
	return err
}

func (c *alertPolicyGRPCClient) UpdateAlertPolicy(ctx context.Context, req *monitoringpb.UpdateAlertPolicyRequest, opts ...gax.CallOption) (*monitoringpb.AlertPolicy, error) {
	if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines {
		cctx, cancel := context.WithTimeout(ctx, 30000*time.Millisecond)
		defer cancel()
		ctx = cctx
	}
	md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "alert_policy.name", url.QueryEscape(req.GetAlertPolicy().GetName())))

	ctx = insertMetadata(ctx, c.xGoogMetadata, md)
	opts = append((*c.CallOptions).UpdateAlertPolicy[0:len((*c.CallOptions).UpdateAlertPolicy):len((*c.CallOptions).UpdateAlertPolicy)], opts...)
	var resp *monitoringpb.AlertPolicy
	err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
		var err error
		resp, err = c.alertPolicyClient.UpdateAlertPolicy(ctx, req, settings.GRPC...)
		return err
	}, opts...)
	if err != nil {
		return nil, err
	}
	return resp, nil
}

// AlertPolicyIterator manages a stream of *monitoringpb.AlertPolicy.
type AlertPolicyIterator struct {
	items    []*monitoringpb.AlertPolicy
	pageInfo *iterator.PageInfo
	nextFunc func() error

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*monitoringpb.AlertPolicy, nextPageToken string, err error)
}

// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func (it *AlertPolicyIterator) PageInfo() *iterator.PageInfo {
	return it.pageInfo
}

// Next returns the next result. Its second return value is iterator.Done if there are no more
// results. Once Next returns Done, all subsequent calls will return Done.
func (it *AlertPolicyIterator) Next() (*monitoringpb.AlertPolicy, error) {
	var item *monitoringpb.AlertPolicy
	if err := it.nextFunc(); err != nil {
		return item, err
	}
	item = it.items[0]
	it.items = it.items[1:]
	return item, nil
}

func (it *AlertPolicyIterator) bufLen() int {
	return len(it.items)
}

func (it *AlertPolicyIterator) takeBuf() interface{} {
	b := it.items
	it.items = nil
	return b
}

redpajama_set_name: RedPajamaGithub


text:
@interface CustomLayout : DWCheckBoxLayout

@end


text:
<extend name="Public/base"/>

<block name="body">

            {$pack['id']?L('_EDIT_WITH_SINGLE_'):L('_NEW_WITH_SINGLE_')}{:L("_PATCH_")}

    <form action="{:U()}" method="post" class="form-horizontal">

            {:L("_PATCH_NAME_")}{:L("_NAME_ENGLISH_PATCH_BLANK_GENERATED_AUTOMATICALLY_ACCORDING_TO_THE_TIME_")}

                <input type="hidden" class="text input-large" name="title_old" value="{$pack.title|default=''}">
                <input type="text" class="text input-large form-control" name="title" value="{$pack.title|default=''}">

            {:L("_PATCH_SQL_CONTENT_")}{:L("_DIRECTLY_FILL_IN_THE_SQL_STATEMENT_")})

                    <textarea name="sql" class="form-control">{$pack.sql|default=''}</textarea>

            {:L("_PATCH_NOTES_")}{:L("_USED_IN_THE_TEXT_OF_THE_ROLE_OF_THE_PATCH_")}

                    <textarea name="des" class="form-control">{$pack.des|default=''}</textarea>

            {:L("_AUTHOR_")}{:L("_FILL_IN_THE_PATCH_")}

                <input type="text" class="text input-large form-control" name="auth" value="{$pack.auth|default=$db['auth']}">

            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">{:L("_SURE_WITH_SPACE_")}</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">{:L("_RETURN_WITH_SPACE_")}</button>

    </form>
</block>
<block name="script">

</block>


text:
// so.. active camera is only at the living room.
/*
 main positions:
 -can't change background while acting another one ( flashlight right corner takes ~0.4 seconds )
 -this is - one screen with one changeable div. nothing more. it must be easy and simple.
*/

/*
My notes:
    -the camera.

    the whole camera thing is static, but it moves a little at the living room.
    and that starting room has bigger width than each other image so far (1300px for living room and 1024px for regular image)
    mechanics:
        camera supports a little moves left-right, what is about 150px. if more -> animate to corner.
        corner to center must be 45% width left trigger.

    -first night.

    well, this night is easy enough. only 3 enemies - bonny, chicka and fuzzy-bears on the bed.

*/

var places = {
    ROOM_IDLE: 0, //room idle
    ROOM_LEFT: 1, //room idle left
    ROOM_RIGHT: 2, //room idle right
    ROOM_CENTER: function() {
        if ( camera.at === this.ROOM_LEFT ) {
            return 3; // room left to right
        } else {
            return 4; // room right to left
        }
    },
    ROOM_RUN: 5, // run animation
    RUN_LEFT: 5, // run to left
    LEFT_IDLE: 5, // at the corner
};

var enemies = [];
var enemy = function(name, can_be_at) {
    this.name = name;
    this.appears = can_be_at; // [room_id, living_room_bed, living_room_closet]
}

var camera = {
    cam: null,
    room: 0,
    active: 0,
    animating: false,
    frame: 0,
    sequences: {
        0: ['living-idle'],
        1: ['look-left-', 2, 'left-static'],
        2: ['look-right-', 2, 'right-static'],
        3: ['left-center-', 2, 'living-idle'],
        4: ['right-center-', 2, 'living-idle']
    },
    width: 0,
    height: 0,
    hitbox_left: null,
    hitbox_right: null,
    interval: null,
    think: null,
    living_x: 0, // 340 = max right ( or camera.width/3.601 ), 0 = max left.
    living_max_x: 0,
    at: 0, // defined at {places}.
    pre_class: 'living-idle',
    animate: function(at_id) {
        this.at = at_id;
        this.animating = at_id;
        this.frame = 0;

        if ( at_id === places.ROOM_LEFT && !hasClass(this.hitbox_right, 'active') )
            this.hitbox_right.classList.toggle('active');
            if ( hasClass(this.hitbox_left, 'active') )
                this.hitbox_left.classList.toggle('active');
        else if ( at_id === places.ROOM_RIGHT && !hasClass(this.hitbox_left, 'active') )
            this.hitbox_left.classList.toggle('active');
            if ( hasClass(this.hitbox_right, 'active') )
                this.hitbox_right.classList.toggle('active');
    },
    init: function() {
        this.cam = document.querySelector('.camera');
        this.active = 1;

        this.hitbox_left = document.querySelector('.hitbox.left');
        this.hitbox_right = document.querySelector('.hitbox.right');
        this.width = this.cam.innerWidth || this.cam.clientWidth;
        this.height = this.cam.innerHeight || this.cam.clientHeight;
        this.cam.style.width = '128%';
        this.living_max_x = (-1)*this.width/3.601;

        this.hitbox_left.onmouseover = function(){
            if ( camera.animating !== false ) return;

            if ( camera.at !== places.ROOM_LEFT )
                camera.animate(places.ROOM_LEFT);

            camera.interval = setInterval(function() {
                if ( camera.living_x>= 0 ) {//camera.living_max_x ) {
                    clearInterval(camera.interval);
                    return;
                }
                camera.living_x+=10;
                if ( camera.living_x > 0 ) {
                    camera.living_x = 0;
                }
                camera.cam.style.backgroundPositionX = camera.living_x+'px';
            }, 10);
        };
        this.hitbox_left.onmouseout = function(){
            if ( camera.animating !== false ) return;

            if ( camera.interval ) clearInterval(camera.interval);

            if ( camera.at === places.ROOM_LEFT )
                camera.animate(places.ROOM_CENTER());
        };

        this.hitbox_right.onmouseover = function(){
            if ( camera.animating !== false ) return;

            if ( camera.at !== places.ROOM_RIGHT )
                camera.animate(places.ROOM_RIGHT);

            camera.interval = setInterval(function() {
                if(camera.living_x <= camera.living_max_x) {
                    clearInterval(camera.interval);
                    return;
                }
                camera.living_x-=10;
                if ( camera.living_x <= camera.living_max_x ) {
                    camera.living_x = camera.living_max_x;
                }
                camera.cam.style.backgroundPositionX = camera.living_x+'px';
            }, 10);
        };
        this.hitbox_right.onmouseout = function(){
            if ( camera.animating !== false ) return;

            if ( camera.interval ) clearInterval(camera.interval);

            if ( camera.at === places.ROOM_RIGHT )
                camera.animate(places.ROOM_CENTER());
        };

        this.think = setInterval(function() {
            if ( camera.animating !== false ) {
                if ( !camera.frame && hasClass(camera.cam, camera.pre_class) ) {
                    camera.cam.classList.toggle(camera.pre_class);
                }
                if ( camera.frame >= camera.sequences[camera.animating][1] ) {
                    camera.cam.classList.toggle(camera.sequences[camera.animating][0]+camera.frame);
                    camera.frame = 0;
                    camera.cam.classList.toggle(camera.sequences[camera.animating][2]);
                    camera.pre_class = camera.sequences[camera.animating][2];
                    camera.animating = false;
                } else {
                    if ( camera.frame ) {
                        // add 'fadeout' effect to 'camera' clones later.
                        camera.cam.classList.toggle(camera.sequences[camera.animating][0]+camera.frame);
                    }
                    camera.frame++;
                    camera.cam.classList.toggle(camera.sequences[camera.animating][0]+camera.frame);
                }
            }
        }, 15);
    }
};

function the_night() {
    console.log('well, must-finish it.');
    camera.init();
}


text:
#include "MiniAppManager.h"
#include <mitkImageCast.h>
#include <mitkTensorImage.h>
#include <mitkIOUtil.h>
#include <mitkBaseDataIOFactory.h>
#include <mitkFiberBundleX.h>
#include <itkStreamlineTrackingFilter.h>
#include <itkDiffusionTensor3D.h>
#include "ctkCommandLineParser.h"
#include <mitkCoreObjectFactory.h>
#include <mitkFiberBundleXWriter.h>

int StreamlineTracking(int argc, char* argv[])
{
    ctkCommandLineParser parser;
    parser.setArgumentPrefix("--", "-");
    parser.addArgument("input", "i", ctkCommandLineParser::StringList, "input tensor image (.dti)", us::Any(), false);
    parser.addArgument("seed", "si", ctkCommandLineParser::String, "binary seed image", us::Any(), true);
    parser.addArgument("mask", "mi", ctkCommandLineParser::String, "binary mask image", us::Any(), true);
    parser.addArgument("faImage", "fai", ctkCommandLineParser::String, "FA image", us::Any(), true);
    parser.addArgument("minFA", "fa", ctkCommandLineParser::Float, "minimum fractional anisotropy threshold", 0.15, true);
    parser.addArgument("minCurv", "c", ctkCommandLineParser::Float, "minimum curvature radius in mm (default = 0.5*minimum-spacing)");
    parser.addArgument("stepSize", "s", ctkCommandLineParser::Float, "stepsize in mm (default = 0.1*minimum-spacing)");
    parser.addArgument("tendf", "f", ctkCommandLineParser::Float, "Weighting factor between first eigenvector (f=1 equals FACT tracking) and input vector dependent direction (f=0).", 1.0, true);
    parser.addArgument("tendg", "g", ctkCommandLineParser::Float, "Weighting factor between input vector (g=0) and tensor deflection (g=1 equals TEND tracking)", 0.0, true);
    parser.addArgument("numSeeds", "n", ctkCommandLineParser::Int, "Number of seeds per voxel.", 1, true);
    parser.addArgument("minLength", "l", ctkCommandLineParser::Float, "minimum fiber length in mm", 20, true);

    parser.addArgument("interpolate", "ip", ctkCommandLineParser::Bool, "Use linear interpolation", false, true);
    parser.addArgument("outFile", "o", ctkCommandLineParser::String, "output fiber bundle (.fib)", us::Any(), false);

    map<string, us::Any> parsedArgs = parser.parseArguments(argc, argv);
    if (parsedArgs.size()==0)
        return EXIT_FAILURE;

    ctkCommandLineParser::StringContainerType inputImages = us::any_cast<ctkCommandLineParser::StringContainerType>(parsedArgs["input"]);
    string dtiFileName;
    string outFileName = us::any_cast<string>(parsedArgs["outFile"]);

    float minFA = 0.15;
    float minCurv = -1;
    float stepSize = -1;
    float tendf = 1;
    float tendg = 0;
    float minLength = 20;
    int numSeeds = 1;
    bool interpolate = false;

    if (parsedArgs.count("minCurv"))
        minCurv = us::any_cast<float>(parsedArgs["minCurv"]);
    if (parsedArgs.count("minFA"))
        minFA = us::any_cast<float>(parsedArgs["minFA"]);
    if (parsedArgs.count("stepSize"))
        stepSize = us::any_cast<float>(parsedArgs["stepSize"]);
    if (parsedArgs.count("tendf"))
        tendf = us::any_cast<float>(parsedArgs["tendf"]);
    if (parsedArgs.count("tendg"))
        tendg = us::any_cast<float>(parsedArgs["tendg"]);
    if (parsedArgs.count("minLength"))
        minLength = us::any_cast<float>(parsedArgs["minLength"]);
    if (parsedArgs.count("numSeeds"))
        numSeeds = us::any_cast<int>(parsedArgs["numSeeds"]);

    if (parsedArgs.count("interpolate"))
        interpolate = us::any_cast<bool>(parsedArgs["interpolate"]);

    try
    {
        typedef itk::StreamlineTrackingFilter< float > FilterType;
        FilterType::Pointer filter = FilterType::New();

        mitk::Image::Pointer mitkImage = NULL;

        MITK_INFO << "Loading tensor images ...";
        typedef itk::Image< itk::DiffusionTensor3D<float>, 3 >    ItkTensorImage;
        dtiFileName = inputImages.at(0);
        for (unsigned int i=0; i<inputImages.size(); i++)
        {
            try
            {
                mitkImage = dynamic_cast<mitk::Image*>(mitk::IOUtil::LoadDataNode(inputImages.at(i))->GetData());
                mitk::TensorImage::Pointer img = dynamic_cast<mitk::TensorImage*>(mitk::IOUtil::LoadDataNode(inputImages.at(i))->GetData());
                ItkTensorImage::Pointer itk_dti = ItkTensorImage::New();
                mitk::CastToItkImage<ItkTensorImage>(img, itk_dti);
                filter->SetInput(i, itk_dti);
            }
            catch(...){ MITK_INFO << "could not load: " << inputImages.at(i); }
        }

        MITK_INFO << "Loading seed image ...";
        typedef itk::Image< unsigned char, 3 >    ItkUCharImageType;
        mitk::Image::Pointer mitkSeedImage = NULL;
        if (parsedArgs.count("seed"))
            mitkSeedImage = mitk::IOUtil::LoadImage(us::any_cast<string>(parsedArgs["seed"]));

        MITK_INFO << "Loading mask image ...";
        mitk::Image::Pointer mitkMaskImage = NULL;
        if (parsedArgs.count("mask"))
            mitkMaskImage = mitk::IOUtil::LoadImage(us::any_cast<string>(parsedArgs["mask"]));

        // instantiate tracker
        filter->SetSeedsPerVoxel(numSeeds);
        filter->SetFaThreshold(minFA);
        filter->SetMinCurvatureRadius(minCurv);
        filter->SetStepSize(stepSize);
        filter->SetF(tendf);
        filter->SetG(tendg);
        filter->SetInterpolate(interpolate);
        filter->SetMinTractLength(minLength);

        if (mitkSeedImage.IsNotNull())
        {
            ItkUCharImageType::Pointer mask = ItkUCharImageType::New();
            mitk::CastToItkImage<ItkUCharImageType>(mitkSeedImage, mask);
            filter->SetSeedImage(mask);
        }

        if (mitkMaskImage.IsNotNull())
        {
            ItkUCharImageType::Pointer mask = ItkUCharImageType::New();
            mitk::CastToItkImage<ItkUCharImageType>(mitkMaskImage, mask);
            filter->SetMaskImage(mask);
        }

        filter->Update();

        vtkSmartPointer<vtkPolyData> fiberBundle = filter->GetFiberPolyData();
        if ( fiberBundle->GetNumberOfLines()==0 )
        {
            MITK_INFO << "No fibers reconstructed. Check parametrization.";
            return EXIT_FAILURE;
        }
        mitk::FiberBundleX::Pointer fib = mitk::FiberBundleX::New(fiberBundle);
        fib->SetReferenceImage(mitkImage);

        mitk::CoreObjectFactory::FileWriterList fileWriters = mitk::CoreObjectFactory::GetInstance()->GetFileWriters();
        for (mitk::CoreObjectFactory::FileWriterList::iterator it = fileWriters.begin() ; it != fileWriters.end() ; ++it)
        {
            if ( (*it)->CanWriteBaseDataType(fib.GetPointer()) ) {
                (*it)->SetFileName( outFileName.c_str() );
                (*it)->DoWrite( fib.GetPointer() );
            }
        }
    }
    catch (itk::ExceptionObject e)
    {
        MITK_INFO << e;
        return EXIT_FAILURE;
    }
    catch (std::exception e)
    {
        MITK_INFO << e.what();
        return EXIT_FAILURE;
    }
    catch (...)
    {
        MITK_INFO << "ERROR!?!";
        return EXIT_FAILURE;
    }
    MITK_INFO << "DONE";
    return EXIT_SUCCESS;
}
RegisterDiffusionMiniApp(StreamlineTracking);


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

package com.azure.resourcemanager.containerregistry.models;

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

/** The properties for updating the platform configuration. */
@Fluent
public final class PlatformUpdateParameters {
    /*
     * The operating system type required for the run.
     */
    @JsonProperty(value = "os")
    private OS os;

    /*
     * The OS architecture.
     */
    @JsonProperty(value = "architecture")
    private Architecture architecture;

    /*
     * Variant of the CPU.
     */
    @JsonProperty(value = "variant")
    private Variant variant;

    /**
     * Get the os property: The operating system type required for the run.
     *
     * @return the os value.
     */
    public OS os() {
        return this.os;
    }

    /**
     * Set the os property: The operating system type required for the run.
     *
     * @param os the os value to set.
     * @return the PlatformUpdateParameters object itself.
     */
    public PlatformUpdateParameters withOs(OS os) {
        this.os = os;
        return this;
    }

    /**
     * Get the architecture property: The OS architecture.
     *
     * @return the architecture value.
     */
    public Architecture architecture() {
        return this.architecture;
    }

    /**
     * Set the architecture property: The OS architecture.
     *
     * @param architecture the architecture value to set.
     * @return the PlatformUpdateParameters object itself.
     */
    public PlatformUpdateParameters withArchitecture(Architecture architecture) {
        this.architecture = architecture;
        return this;
    }

    /**
     * Get the variant property: Variant of the CPU.
     *
     * @return the variant value.
     */
    public Variant variant() {
        return this.variant;
    }

    /**
     * Set the variant property: Variant of the CPU.
     *
     * @param variant the variant value to set.
     * @return the PlatformUpdateParameters object itself.
     */
    public PlatformUpdateParameters withVariant(Variant variant) {
        this.variant = variant;
        return this;
    }

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


text: require 'number_to_cn.rb'