text:
package org.eclipse.bpel.ui.adapters;

import org.eclipse.bpel.ui.BPELUIPlugin;
import org.eclipse.bpel.ui.IBPELUIConstants;
import org.eclipse.bpel.ui.Messages;
import org.eclipse.swt.graphics.Image;

public class XSDTypeDefinitionAdapter extends XSDAbstractAdapter  {

	/* ILabeledElement overrides */

	@Override
	public Image getSmallImage(Object object) {
		return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_XSD_SIMPLE_TYPE_DEFINITION_16);
	}

	@Override
	public String getTypeLabel(Object object) {
		return Messages.XSDTypeDefinitionAdapter_XSD_Type_1;
	}

}

redpajama_set_name: RedPajamaGithub


text:
sudo yum update -y
sudo yum install unzip -y

sudo yum install httpd -y
chkconfig --level 234 httpd on

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
sudo yum install php70w php70w-pear php70w-mysql php70w-zip php70w-phar php70w-gd php70w-mbstring -y
service httpd start
php --version

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo yum install mysql-server -y
chkconfig --level 234 mysqld on
service mysqld start

cd /var/www/
rm -rf html
wget https://github.com/ChurchCRM/CRM/releases/download/2.4.4/ChurchCRM-2.4.4.zip
unzip ChurchCRM-2.4.4.zip
mv churchcrm/ html


text:
package com.fu.group10.apps.staff.fragment;

import android.app.*;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.widget.DialerFilter;
import android.widget.TextView;
import android.widget.Toast;
import com.fu.group10.apps.staff.DummyApplication;
import com.fu.group10.apps.staff.R;
import com.fu.group10.apps.staff.Utils.Constants;
import com.fu.group10.apps.staff.Utils.RequestSender;
import com.fu.group10.apps.staff.activity.ListRoomActivity;
import com.fu.group10.apps.staff.activity.MainActivity;
import com.fu.group10.apps.staff.activity.ResolveReportActivity;

/**
 * Created by QuangTV on 6/13/2015.
 */
public class ChooseRoomDialogFragment extends DialogFragment{

    String roomId;
    String current;
    String[] items;
    TextView txtNewRoom;
    ProgressDialog progress;

    private AlertDialog dialog;
    OnListChooseListener onListChooseListener;
    Context context;

    public ChooseRoomDialogFragment() {

    }

    public void setParam(String[] items, String current) {
        this.items = items;
        this.current = current;
    }
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        context = getActivity().getApplicationContext();
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        builder.setTitle(R.string.choose_room_dialog_title).setPositiveButton(R.string.action_choose_room, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        }).setNegativeButton("Hủy", new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialog, int which) {

            }
        }).setSingleChoiceItems(items, 0, new DialogInterface.OnClickListener() {
            @Override
            public void onClick(DialogInterface dialogInterface, int i) {
                changeRoom(current, items[i]);
            }
        });
        dialog =  builder.create();
        return dialog;
    }

    public String getRoomId() {
        return roomId;
    }

    public interface OnListChooseListener {
        void onListChoose(String name);
    }

    public void showProgress() {
        progress = ProgressDialog.show(context, "", "Đang đổi phòng", true);
    }

    public void changeRoom(String from, String to) {
        String url = Constants.API_CHANGE_ROOM + from + "&to=" + to;
        RequestSender sender = new RequestSender();
        sender.start(url, new RequestSender.IRequestSenderComplete() {
            @Override
            public void onRequestComplete(String result) {
                //progress.dismiss();
                if (result.equalsIgnoreCase("true")) {
                    openHome();
                } else {
                    Toast.makeText(context, "Có lỗi xảy ra, vui lòng thử lại!", Toast.LENGTH_LONG).show();
                }
            }
        });
    }

    public void openHome() {
        Intent intent = new Intent(context, ListRoomActivity.class);
        intent.putExtra("username", "staff");
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);

        Toast.makeText(context, "Đổi phòng thành công", Toast.LENGTH_LONG).show();
    }

}


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=emulateIE7" />
    <title>Coverage for tests/test.py: 100%</title>
    <link rel="stylesheet" href="style.css" type="text/css">

Coverage for tests/test.py :
            100%

            4 statements
            4 run
            0 missing
            0 excluded

Hot-keys on this page

        r
        m
        x
        p   toggle line displays

        j
        k   next/prev highlighted chunk

        0   (zero) top of page

        1   (one) first highlighted chunk

1

2

3

4

5

import unittest

if __name__ == '__main__':

    testsuite = unittest.TestLoader().discover('.')

    unittest.TextTestRunner(verbosity=1).run(testsuite)

            « index     coverage.py v4.2,
            created at 2016-12-17 09:16


text:
@interface CRGetAuthorInfoRequest : CRBaseRequestManager

+ (void)getAuthorInfoWithUserId:(NSNumber *)userId
                        success:(void (^) (CRMemberInfoModel *memeberInfoModel))success
                        failure:(void (^) (NSString *errorMsg))failure;

@end


text:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var SomeBase = (function () {
    function SomeBase() {
    }
    return SomeBase;
})();
var SomeDerived1 = (function (_super) {
    __extends(SomeDerived1, _super);
    function SomeDerived1() {
        _super.apply(this, arguments);
    }
    return SomeDerived1;
})(SomeBase);
var SomeDerived2 = (function (_super) {
    __extends(SomeDerived2, _super);
    function SomeDerived2() {
        _super.apply(this, arguments);
    }
    return SomeDerived2;
})(SomeBase);
var SomeDerived3 = (function (_super) {
    __extends(SomeDerived3, _super);
    function SomeDerived3() {
        _super.apply(this, arguments);
    }
    return SomeDerived3;
})(SomeBase);

var fn1;

// Ambiguous call picks the first overload in declaration order
var s = new fn1(undefined);
var s;

// No candidate overloads found
new fn1({}); // Error

var fn2;

var d = new fn2(0, undefined);
var d;

// Generic and non - generic overload where generic overload is the only candidate when called without type arguments
var s = new fn2(0, '');

// Generic and non - generic overload where non - generic overload is the only candidate when called with type arguments
new fn2('', 0); // Error

// Generic and non - generic overload where non - generic overload is the only candidate when called without type arguments
new fn2('', 0); // OK

var fn3;

var s = new fn3(3);
var s = new fn3('', 3, '');
var n = new fn3(5, 5, 5);
var n;

// Generic overloads with differing arity called with type arguments matching each overload type parameter count
var s = new fn3(4);
var s = new fn3('', '', '');
var n = new fn3('', '', 3);

// Generic overloads with differing arity called with type argument count that doesn't match any overload
new fn3(); // Error

var fn4;

new fn4('', 3);
new fn4(3, ''); // Error
new fn4('', 3); // Error
new fn4(3, '');

// Generic overloads with constraints called without type arguments but with types that satisfy the constraints
new fn4('', 3);
new fn4(3, '');
new fn4(3, undefined);
new fn4('', null);

// Generic overloads with constraints called with type arguments that do not satisfy the constraints
new fn4(null, null); // Error

// Generic overloads with constraints called without type arguments but with types that do not satisfy the constraints
new fn4(true, null); // Error
new fn4(null, true); // Error

var fn5;
var n = new fn5(function (n) {
    return n.toFixed();
});
var s = new fn5(function (n) {
    return n.substr(0);
});


text:
package com.cardinity.exceptions;

public abstract class CardinityException extends RuntimeException {

    private static final long serialVersionUID = -4551051157520060255L;

    public CardinityException(String message) {
        super(message, null);
    }

}


text:
require_relative 'config/application'

Rails.application.load_tasks
task(:default).clear

desc 'Run linters, quality, security and tests'
task :default do
  sh 'bundle exec rubocop'
  sh 'bundle exec slim-lint app/views/'
  sh 'bundle exec rubycritic app/ config/ lib/ --no-browser --minimum-score 94 --format console'
  sh 'bundle exec bundle-audit check --update'
  sh 'bundle exec brakeman -z'
  sh 'bundle exec rails db:setup RAILS_ENV=test'
  sh 'bundle exec rails db:migrate RAILS_ENV=test' # runs any pending migrations
  sh 'bundle exec rake factory_bot:lint RAILS_ENV=test'
  sh 'bundle exec rspec spec/'
end


text:
source $GOPHER_INSTALLDIR/lib/gopherbot_v1.sh

if [ -z "$VAULT_PASSWORD" ]
then
    Log "Error" "Empty VAULT_PASSWORD in vault-password.sh, needs encrypted parameter in repositories.yaml"
    echo ""
    exit 1
fi

cat <<< "$VAULT_PASSWORD"


text:
<!DOCTYPE html>

<link rel="stylesheet" type="text/css" href="../../lib/css/fancytree/ui.fancytree.min.css"/>
<link rel="stylesheet" type="text/css" href="../../css/adapter.css"/>
<link rel="stylesheet" type="text/css" href="../../lib/css/materialize.css">

<link rel="stylesheet" type="text/css" href="ext/metroui/css/metro.min.css" />
<link rel="stylesheet" type="text/css" href="ext/metroui/css/metro-icons.min.css" />
<link rel="stylesheet" type="text/css" href="ext/metroui/css/metro-colors.min.css" />
<link rel="stylesheet" type="text/css" href="css/yahka.admin.css" />

iobroker.yahka adapter settings

The page below is used to assign ioBroker states to HomeKit characteristics.

                    <button class="image-button primary" id="yahka_add_device">

                        Add Device
                    </button>
                    <button class="image-button primary" id="yahka_add_camera">

                            Add Camera
                    </button>
                    <button class="image-button danger" id="yahka_remove_device">

                        Remove Device
                    </button>
                    <button class="image-button primary" id="yahka_add_service">

                        Add Service
                    </button>

Devices

Properties and Services

    <template id="yahka_devicelist_entry">

    </template>

    <template id="yahka_device_info_panel_template">

                Device Properties

Enabled:

                        <input type="checkbox" id="enabled"/>

Name:

A device with this name already exists. Please change the name!

                        <input class="full-size" type="text" id="name"/>

Manufacturer:

                        <input class="full-size" type="text" id="manufacturer"/>

Model:

                        <input class="full-size" type="text" id="model"/>

Serial:

                        <input class="full-size" type="text" id="serial"/>

Categeory:

                        <select class="full-size"  id="category"></select>

    </template>

    <template id="yahka_bridgeconfig_template">

Name:descriptive only - displayed in homekit apps. Changes are only recognized after readding the bridge in the app.

A device with this name already exists. Please change the name!

                <input class="full-size" type="text" id="name"/>

Manufacturer:descriptive only - displayed in some homekit apps

                <input class="full-size" type="text" id="manufacturer"/>

Model:descriptive only - displayed in some homekit apps

                <input class="full-size" type="text" id="model"/>

Serial:descriptive only - displayed in some homekit apps

                <input class="full-size" type="text" id="serial"/>

Username:needs to be in form of a mac address, e.g: d8:be:54:e7:06:f8. After changing this field, the bridge needs to be reconfigured in the HomeKit database

                <input class="full-size" type="text" id="username"/>

Pincode:needs to be in the form of 123-45-678

                <input class="full-size" type="text" id="pincode"/>

Port:0 = random free port assigned by the operation system (default)

                <input class="full-size" type="number" id="port"/>

Verbose Logging:true = redirect hap-node logging to adapter logging

                <input class="" type="checkbox" id="verboseLogging"/>

    </template>

    <template id="yahka_cameraConfig_template">

                Basic Properties

Enabled:

                        <input type="checkbox" id="enabled"/>

Device name:

A device with this name already exists. Please change the name!

                        <input class="full-size" type="text" id="name"/>

Manufacturer:

                        <input class="full-size" type="text" id="manufacturer"/>

Model:

                        <input class="full-size" type="text" id="model"/>

Serial:

                        <input class="full-size" type="text" id="serial"/>

Username:needs to be in form of a mac address, e.g: d8:be:54:e7:06:f8. After changing this field, the camera needs to be reconfigured in the HomeKit database

                        <input class="full-size" type="text" id="username"/>

Pincode:needs to be in the form of 123-45-678

                        <input class="full-size" type="text" id="pincode"/>

Port:0 = random free port assigned by the operation system (default)

                        <input class="full-size" type="number" id="port"/>

                Stream Properties

Source:

                        <input class="full-size" type="text" id="source"/>

Codec:

                        <input class="full-size" type="text" id="codec"/>

Number of Streams:

                        <input class="full-size" type="text" id="numberOfStreams"/>

maxWidth:

                        <input class="full-size" type="text" id="maxWidth"/>

maxHeight:

                        <input class="full-size" type="text" id="maxHeight"/>

maxFPS:

                        <input class="full-size" type="text" id="maxFPS"/>

                Advanced Settings

FFMPEG Command Line - Snapshot:

                        <textarea rows=8 class="flex-grow" id="ffmpeg_snapshot"></textarea>

Available replacers:

${source}

${width}

${height}

FFMPEG Command Line - Stream:

                        <textarea rows=8 class="flex-grow" id="ffmpeg_stream"></textarea>

Available replacers:

${codec}

${fps}

${width}

${height}

${bitrate}

${videokey}

${targetAddress}

${targetVideoPort}

    </template>

    <template id="yahka_device_service_panel">

                Service:

Service name:

                        <input class="full-size" type="text" id="service_name"/>

Service Type:

                        <select class="full-size"  id="service_type"></select>

Service Subtype:

                        <input class="full-size" type="text" id="service_subtype"/>

Characteristics Table

Enabled

Name

1: InOutFunction / 2: ConversionFunction

1: InOutParams / 2: ConversionParams

    </template>

    <template id="yahka_characteristic_row">

                        <input type="checkbox" id="characteristic_enabled">

                    1:

                        <select id="characteristic_inoutfunction"></select>

                        <textarea id="characteristic_inoutparams" rows=1></textarea>

                    <button class="input-control button id-selector"></button>

                    2:

                        <select  id="characteristic_conversionfunction"></select>

                        <textarea id="characteristic_conversionparams" rows=1></textarea>

                    <button class="input-control button id-selector"></button>

    </template>

            checkSelect
            closeCancel


text:
package com.vstechlab.demo.data.net;

import com.vstechlab.demo.data.entity.FollowersEntity;

import java.util.List;

import retrofit.RestAdapter;
import rx.Observable;

public abstract class ApiManager {
    private static final String BASE_URL = "https://api.github.com";
    private static RestAdapter mRestAdapter;

    public static RestAdapter getAdapter(){
        if (null == mRestAdapter) {
            createRestAdapter();
        }
        return mRestAdapter;
    }

    private static void createRestAdapter(){
        mRestAdapter = new RestAdapter.Builder()
                .setEndpoint(BASE_URL)
                .setLogLevel(RestAdapter.LogLevel.FULL)
                .build();
    }

    public abstract Observable<List<FollowersEntity>> getFollowers(String username);

}


text:
voxce
=====

Clinical Trial Management Framework Open Source

The system is developed for scalability, standardization and flexibility. VOXCE is developed on a modular platform allowing for flexibility throughout the development process.

Each one of the major tabs in the system is developed as its own module, which ensures that if an error occurs within one of the modules, it will not affect the flow of the system.

All relationships occur on the database level and through group rights.


text:
{% if site.duoshuo_shortname %}

{% endif %}

{% if site.disqus_shortname %}

Please enable JavaScript to view the comments powered by Disqus.
{% endif %}

{% if site.livere_shortname %}

为正常使用来必力评论功能请激活JavaScript

{% endif %}

{% if site.yungentie_shortname %}

<link rel="stylesheet" href="{{ "/css/yungentie.css " | prepend: site.baseurl }}">
{% endif %}

{% if site.gc_comments_repo %}
	{% if page.issue_id %}

			点击参与讨论

	<link rel="stylesheet" href="{{ "/css/github-comments.css " | prepend: site.baseurl }}">
	{% else %}

		本文暂时关闭评论

	{% endif %}
{% endif %}


text:
import {
  interactor,
  triggerable,
} from '@bigtest/interactor';

const KeyboardInteractor = interactor(class KeyboardInteractor {
  focus() {
    this.$root.focus();
  }

  pressCtrl = triggerable('keydown', { keyCode: 17 });
  pressAlt = triggerable('keydown', { keyCode: 18 });
  expandAll = triggerable('keydown', { key: 'b', keyCode: 66, ctrlKey: true, altKey: true });
  collapseAll = triggerable('keydown', { key: 'g', keyCode: 71, ctrlKey: true, altKey: true });
});

export default KeyboardInteractor;


text:
package cmd

import (
	"bufio"
	"fmt"
	"os"

	"github.com/smira/aptly/deb"
	"github.com/smira/aptly/query"
	"github.com/smira/commander"
	"github.com/smira/flag"
)

func printReferencesTo(p *deb.Package) (err error) {
	err = context.CollectionFactory().RemoteRepoCollection().ForEach(func(repo *deb.RemoteRepo) error {
		err := context.CollectionFactory().RemoteRepoCollection().LoadComplete(repo)
		if err != nil {
			return err
		}
		if repo.RefList() != nil {
			if repo.RefList().Has(p) {
				fmt.Printf("  mirror %s\n", repo)
			}
		}
		return nil
	})
	if err != nil {
		return err
	}

	err = context.CollectionFactory().LocalRepoCollection().ForEach(func(repo *deb.LocalRepo) error {
		err := context.CollectionFactory().LocalRepoCollection().LoadComplete(repo)
		if err != nil {
			return err
		}
		if repo.RefList() != nil {
			if repo.RefList().Has(p) {
				fmt.Printf("  local repo %s\n", repo)
			}
		}
		return nil
	})
	if err != nil {
		return err
	}

	err = context.CollectionFactory().SnapshotCollection().ForEach(func(snapshot *deb.Snapshot) error {
		err := context.CollectionFactory().SnapshotCollection().LoadComplete(snapshot)
		if err != nil {
			return err
		}
		if snapshot.RefList().Has(p) {
			fmt.Printf("  snapshot %s\n", snapshot)
		}
		return nil
	})
	if err != nil {
		return err
	}

	return nil
}

func aptlyPackageShow(cmd *commander.Command, args []string) error {
	var err error
	if len(args) != 1 {
		cmd.Usage()
		return commander.ErrCommandError
	}

	q, err := query.Parse(args[0])
	if err != nil {
		return fmt.Errorf("unable to show: %s", err)
	}

	withFiles := context.Flags().Lookup("with-files").Value.Get().(bool)
	withReferences := context.Flags().Lookup("with-references").Value.Get().(bool)

	w := bufio.NewWriter(os.Stdout)

	result := q.Query(context.CollectionFactory().PackageCollection())

	err = result.ForEach(func(p *deb.Package) error {
		p.Stanza().WriteTo(w, p.IsSource, false)
		w.Flush()
		fmt.Printf("\n")

		if withFiles {
			fmt.Printf("Files in the pool:\n")
			for _, f := range p.Files() {
				path, err := context.PackagePool().Path(f.Filename, f.Checksums.MD5)
				if err != nil {
					return err
				}
				fmt.Printf("  %s\n", path)
			}
			fmt.Printf("\n")
		}

		if withReferences {
			fmt.Printf("References to package:\n")
			printReferencesTo(p)
			fmt.Printf("\n")
		}

		return nil
	})

	if err != nil {
		return fmt.Errorf("unable to show: %s", err)
	}

	return err
}

func makeCmdPackageShow() *commander.Command {
	cmd := &commander.Command{
		Run:       aptlyPackageShow,
		UsageLine: "show <package-query>",
		Short:     "show details about packages matching query",
		Long: `
Command shows displays detailed meta-information about packages
matching query. Information from Debian control file is displayed.
Optionally information about package files and
inclusion into mirrors/snapshots/local repos is shown.

Example:

    $ aptly package show 'nginx-light_1.2.1-2.2+wheezy2_i386'
`,
		Flag: *flag.NewFlagSet("aptly-package-show", flag.ExitOnError),
	}

	cmd.Flag.Bool("with-files", false, "display information about files from package pool")
	cmd.Flag.Bool("with-references", false, "display information about mirrors, snapshots and local repos referencing this package")

	return cmd
}


text:
#ifndef NSYNC_PUBLIC_NSYNC_NOTE_H_
#define NSYNC_PUBLIC_NSYNC_NOTE_H_

#include "nsync_cpp.h"
#include "nsync_time.h"

NSYNC_CPP_START_

/* An nsync_note represents a single bit that can transition from 0 to 1 at
   most once.  When 1, the note is said to be notified.  There are operations
   to wait for the transition, which can be triggered either by an explicit
   call, or timer expiry.  Notes can have parent notes; a note becomes notified
   if its parent becomes notified.  */
typedef struct nsync_note_s_ *nsync_note;

/* Return a freshly allocated nsync_note, or NULL if an nsync_note cannot be
   created.

   If parent!=NULL, the allocated nsync_note's parent will be parent.  The
   newaly allocated note will be automatically notified at abs_deadline, and is
   notified at initialization if abs_deadline==nsync_zero_time.

   nsync_notes should be passed to nsync_note_free() when no longer needed.  */
nsync_note nsync_note_new (nsync_note parent, nsync_time abs_deadline);

/* Free resources associated with n.  Requires that n was allocated by
   nsync_note_new(), and no concurrent or future operations are applied to n
   directly.
   It is legal to call nsync_note_free() on a node even if it has a parent or
   children that are in use; if n has both a parent and children, n's
   parent adopts its children.  */
void nsync_note_free (nsync_note n);

/* Notify n and all its descendants. */
void nsync_note_notify (nsync_note n);

/* Return whether n has been notified.  */
int nsync_note_is_notified (nsync_note n);

/* Wait until n has been notified or abs_deadline is reached, and return
   whether n has been notified.  If abs_deadline==nsync_time_no_deadline,
   the deadline is far in the future. */
int nsync_note_wait (nsync_note n, nsync_time abs_deadline);

/* Return the expiry time associated with n.
   This is the minimum of the abs_deadline passed on creation and that of any
   of its ancestors.  */
nsync_time nsync_note_expiry (nsync_note n);

NSYNC_NOTE_CPP_OVERLOAD_
NSYNC_CPP_END_

#endif /*NSYNC_PUBLIC_NSYNC_NOTE_H_*/


text:
#pragma once
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace EC2
{
namespace Model
{
  enum class FpgaImageStateCode
  {
    NOT_SET,
    pending,
    failed,
    available,
    unavailable
  };

namespace FpgaImageStateCodeMapper
{
AWS_EC2_API FpgaImageStateCode GetFpgaImageStateCodeForName(const Aws::String& name);

AWS_EC2_API Aws::String GetNameForFpgaImageStateCode(FpgaImageStateCode value);
} // namespace FpgaImageStateCodeMapper
} // namespace Model
} // namespace EC2
} // namespace Aws


text:
package org.javarosa.core.services;

import org.javarosa.core.util.PrefixTree;
import org.javarosa.core.util.externalizable.CannotCreateObjectException;
import org.javarosa.core.util.externalizable.PrototypeFactory;

public class PrototypeManager {
	private static PrefixTree prototypes;
	private static PrototypeFactory staticDefault;

	public static void registerPrototype (String className) {
		getPrototypes().addString(className);

		try {
			PrototypeFactory.getInstance(Class.forName(className));
		} catch (ClassNotFoundException e) {
			throw new CannotCreateObjectException(className + ": not found");
		}
		rebuild();
	}

	public static void registerPrototypes (String[] classNames) {
		for (int i = 0; i < classNames.length; i++)
			registerPrototype(classNames[i]);
	}

	public static PrefixTree getPrototypes () {
		if (prototypes == null) {
			prototypes = new PrefixTree();
		}
		return prototypes;
	}

	public static PrototypeFactory getDefault() {
		if(staticDefault == null) {
			rebuild();
		}
		return staticDefault;
	}

	private static void rebuild() {
		if(staticDefault == null) {
			staticDefault = new PrototypeFactory(getPrototypes());
			return;
		}
		synchronized(staticDefault) {
			staticDefault = new PrototypeFactory(getPrototypes());
		}
	}

}


text:
using System.Threading;

using NUnit.Framework;
using System.Threading.Tasks;

namespace Moq.Sequences.Tests
{
    public class SequenceTest
    {
        private Mock<I> mock;

        [SetUp]
        public void SetUp()
        {
            mock = new Mock<I>();
        }

        [Test]
        public void Loop_with_prior_missing_call()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence();

                using (Sequence.Loop(Times.Exactly(1)))
                {
                    mock.Setup(_ => _.Method2()).InSequence();
                }

                Assert.Throws<SequenceException>(() => mock.Object.Method2());
            }
        }

        [Test]
        public void Loop_steps_with_non_loop_steps()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence();

                using (Sequence.Loop(Times.Exactly(1)))
                {
                    mock.Setup(_ => _.Method2()).InSequence();
                }

                mock.Setup(_ => _.Method3()).InSequence();

                mock.Object.Method1();
                mock.Object.Method2();
                mock.Object.Method3();
            }
        }

        [Test]
        public void Nested_loops()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence();

                using (Sequence.Loop(Times.Exactly(1)))
                {
                    mock.Setup(_ => _.Method2()).InSequence();

                    using (Sequence.Loop(Times.Exactly(1)))
                    {
                        mock.Setup(_ => _.Method3()).InSequence();
                    }
                }

                mock.Object.Method1();
                mock.Object.Method2();
                mock.Object.Method3();
            }
        }

        [Test]
        public void Empty_sequence_is_ignored()
        {
            using (Sequence.Create())
            {
            }
        }

        [Test]
        public void Explicit_MockSequence_Dispose_is_ignored()
        {
            using (var sequence = Sequence.Create())
            {
                sequence.Dispose();
                sequence.Dispose();
                sequence.Dispose();
            }
        }

        [Test]
        public void Method_call_in_sequence()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence();
                mock.Setup(_ => _.Method2()).InSequence();

                mock.Object.Method1();
                mock.Object.Method2();
            }
        }

        [Test]
        public void Method_call_out_of_sequence()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence(Times.AtMostOnce());
                mock.Setup(_ => _.Method2()).InSequence();

                mock.Object.Method2();
                Assert.Throws<SequenceException>(() => mock.Object.Method1());
            }
        }

        [Test]
        public void Method_call_before_previous_one_verified()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence();
                mock.Setup(_ => _.Method2()).InSequence();

                Assert.Throws<SequenceException>(() => mock.Object.Method2());
            }
        }

        [Test]
        public void Property_get_in_sequence()
        {
            using (Sequence.Create())
            {
                mock.SetupGet(_ => _.Property1).InSequence().Returns(0);
                mock.SetupGet(_ => _.Property2).InSequence().Returns(0);

                var foo = mock.Object.Property1;
                foo = mock.Object.Property2;
            }
        }

        [Test]
        public void Property_get_out_of_sequence()
        {
            using (Sequence.Create())
            {
                mock.SetupGet(_ => _.Property1).InSequence(Times.AtMostOnce()).Returns(0);
                mock.SetupGet(_ => _.Property2).InSequence().Returns(0);

                int foo = mock.Object.Property2;
                Assert.Throws<SequenceException>(() => foo = mock.Object.Property1);
            }
        }

        [Test]
        public void Property_get_before_previous_one_verified()
        {
            using (Sequence.Create())
            {
                mock.SetupGet(_ => _.Property1).InSequence().Returns(0);
                mock.SetupGet(_ => _.Property2).InSequence().Returns(0);

                int foo;
                Assert.Throws<SequenceException>(() => foo = mock.Object.Property2);
            }
        }

        [Test]
        public void Property_get_via_Setup()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Property1).InSequence().Returns(0);
                mock.Setup(_ => _.Property2).InSequence().Returns(0);

                var foo = mock.Object.Property1;
                foo = mock.Object.Property2;
            }
        }

        [Test]
        public void Property_set_in_sequence()
        {
            using (Sequence.Create())
            {
                mock.SetupSet(_ => _.Property1 = 0).InSequence();
                mock.SetupSet(_ => _.Property2 = 0).InSequence();

                mock.Object.Property1 = 0;
                mock.Object.Property2 = 0;
            }
        }

        [Test]
        public void Property_set_out_of_sequence()
        {
            using (Sequence.Create())
            {
                mock.SetupSet(_ => _.Property1 = 0).InSequence(Times.AtMostOnce());
                mock.SetupSet(_ => _.Property2 = 0).InSequence();

                mock.Object.Property2 = 0;
                Assert.Throws<SequenceException>(() => mock.Object.Property1 = 0);
            }
        }

        [Test]
        public void Property_set_before_previous_one_verified()
        {
            using (Sequence.Create())
            {
                mock.SetupSet(_ => _.Property1 = 0).InSequence();
                mock.SetupSet(_ => _.Property2 = 0).InSequence();

                Assert.Throws<SequenceException>(() => mock.Object.Property2 = 0);
            }
        }

        [Test]
        public void Multiple_mocks_in_same_sequence()
        {
            var mock1 = new Mock<I>();
            var mock2 = new Mock<I>();

            using (Sequence.Create())
            {
                mock1.Setup(_ => _.Method1()).InSequence();
                mock2.Setup(_ => _.Method1()).InSequence();

                Assert.Throws<SequenceException>(() => mock2.Object.Method1());
            }
        }

        [Test]
        public void Enforce_active_sequence_for_Setup_InSequence_extension()
        {
            Assert.Throws<SequenceUsageException>(() => mock.Setup(_ => _.Method1()).InSequence());
        }

        [Test]
        public void Enforce_active_sequence_for_mock_calls_within_sequences()
        {
            using (Sequence.Create())
            {
                mock.Setup(_ => _.Method1()).InSequence(Times.AtMostOnce());
            }

            Assert.Throws<SequenceUsageException>(() => mock.Object.Method1());
        }

        [Test]
        public void Enforce_mock_calls_outside_sequences_if_mock_is_strict()
        {
            var strictMock = new Mock<I>(MockBehavior.Strict);

            using (Sequence.Create())
            {
            }

            Assert.Throws<MockException>(() => strictMock.Object.Method1());
        }

        [Test]
        public void Enforce_active_sequence_for_loop()
        {
            Assert.Throws<SequenceUsageException>(() => Sequence.Loop());
        }

        [Test]
        public void Enforce_only_one_active_sequence()
        {
            using (Sequence.Create())
            {
                Assert.Throws<SequenceUsageException>(() => Sequence.Create());
            }
        }

        [Test]
        public void Enforce_that_loops_must_be_disposed()
        {
            Assert.Throws<SequenceUsageException>(delegate
            {
                using (Sequence.Create())
                {
                    Sequence.Loop();
                }
            });
        }

        [Test]
        public void Enforce_that_all_steps_in_a_sequence_must_be_completed()
        {
            Assert.Throws<SequenceException>(delegate
            {
                using (Sequence.Create())
                {
                    mock.Setup(_ => _.Method1()).InSequence();
                }
            });
        }

        [Test]
        public void Support_multiple_sequences_in_different_threads()
        {
            var mock1 = new Mock<I>();
            var mock2 = new Mock<I>();

            using (Sequence.Create())
            {
                mock1.Setup(_ => _.Method1()).InSequence();
                mock1.Setup(_ => _.Method2()).InSequence();

                var calledOnThread = new AutoResetEvent(false);
                var calledOnMain = new AutoResetEvent(false);

                new Thread(() =>
                {
                    using (Sequence.Create())
                    {
                        mock2.Setup(_ => _.Method1()).InSequence();
                        mock2.Setup(_ => _.Method2()).InSequence();

                        calledOnMain.WaitOne();
                        mock2.Object.Method1();
                        calledOnThread.Set();

                        calledOnMain.WaitOne();
                        mock2.Object.Method2();
                        calledOnThread.Set();
                    }
                }).Start();

                mock1.Object.Method1();
                calledOnMain.Set();

                calledOnThread.WaitOne();
                mock1.Object.Method2();
                calledOnMain.Set();
            }
        }

        public interface I
        {
            void Method1();
            void Method2();
            void Method3();
            void Method4(int foo);
            int Property1 { get; set; }
            int Property2 { get; set; }
        }
    }
}


text:
package armoperationalinsights

import (
	"context"
	"errors"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
	armruntime "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm/runtime"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
	"net/http"
	"net/url"
	"strconv"
	"strings"
)

// WorkspacesClient contains the methods for the Workspaces group.
// Don't use this type directly, use NewWorkspacesClient() instead.
type WorkspacesClient struct {
	host           string
	subscriptionID string
	pl             runtime.Pipeline
}

// NewWorkspacesClient creates a new instance of WorkspacesClient with the specified values.
// subscriptionID - The ID of the target subscription.
// credential - used to authorize requests. Usually a credential from azidentity.
// options - pass nil to accept the default values.
func NewWorkspacesClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*WorkspacesClient, error) {
	if options == nil {
		options = &arm.ClientOptions{}
	}
	ep := cloud.AzurePublic.Services[cloud.ResourceManager].Endpoint
	if c, ok := options.Cloud.Services[cloud.ResourceManager]; ok {
		ep = c.Endpoint
	}
	pl, err := armruntime.NewPipeline(moduleName, moduleVersion, credential, runtime.PipelineOptions{}, options)
	if err != nil {
		return nil, err
	}
	client := &WorkspacesClient{
		subscriptionID: subscriptionID,
		host:           ep,
		pl:             pl,
	}
	return client, nil
}

// BeginCreateOrUpdate - Create or update a workspace.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
// resourceGroupName - The name of the resource group. The name is case insensitive.
// workspaceName - The name of the workspace.
// parameters - The parameters required to create or update a workspace.
// options - WorkspacesClientBeginCreateOrUpdateOptions contains the optional parameters for the WorkspacesClient.BeginCreateOrUpdate
// method.
func (client *WorkspacesClient) BeginCreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*runtime.Poller[WorkspacesClientCreateOrUpdateResponse], error) {
	if options == nil || options.ResumeToken == "" {
		resp, err := client.createOrUpdate(ctx, resourceGroupName, workspaceName, parameters, options)
		if err != nil {
			return nil, err
		}
		return runtime.NewPoller[WorkspacesClientCreateOrUpdateResponse](resp, client.pl, nil)
	} else {
		return runtime.NewPollerFromResumeToken[WorkspacesClientCreateOrUpdateResponse](options.ResumeToken, client.pl, nil)
	}
}

// CreateOrUpdate - Create or update a workspace.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
func (client *WorkspacesClient) createOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*http.Response, error) {
	req, err := client.createOrUpdateCreateRequest(ctx, resourceGroupName, workspaceName, parameters, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.pl.Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusCreated, http.StatusAccepted) {
		return nil, runtime.NewResponseError(resp)
	}
	return resp, nil
}

// createOrUpdateCreateRequest creates the CreateOrUpdate request.
func (client *WorkspacesClient) createOrUpdateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace, options *WorkspacesClientBeginCreateOrUpdateOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}"
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if workspaceName == "" {
		return nil, errors.New("parameter workspaceName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName))
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	req, err := runtime.NewRequest(ctx, http.MethodPut, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2021-12-01-preview")
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, runtime.MarshalAsJSON(req, parameters)
}

// BeginDelete - Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription,
// resource group and location. The name is kept for 14 days and cannot be used for
// another workspace. To remove the workspace completely and release the name, use the force flag.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
// resourceGroupName - The name of the resource group. The name is case insensitive.
// workspaceName - The name of the workspace.
// options - WorkspacesClientBeginDeleteOptions contains the optional parameters for the WorkspacesClient.BeginDelete method.
func (client *WorkspacesClient) BeginDelete(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*runtime.Poller[WorkspacesClientDeleteResponse], error) {
	if options == nil || options.ResumeToken == "" {
		resp, err := client.deleteOperation(ctx, resourceGroupName, workspaceName, options)
		if err != nil {
			return nil, err
		}
		return runtime.NewPoller[WorkspacesClientDeleteResponse](resp, client.pl, nil)
	} else {
		return runtime.NewPollerFromResumeToken[WorkspacesClientDeleteResponse](options.ResumeToken, client.pl, nil)
	}
}

// Delete - Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription,
// resource group and location. The name is kept for 14 days and cannot be used for
// another workspace. To remove the workspace completely and release the name, use the force flag.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
func (client *WorkspacesClient) deleteOperation(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*http.Response, error) {
	req, err := client.deleteCreateRequest(ctx, resourceGroupName, workspaceName, options)
	if err != nil {
		return nil, err
	}
	resp, err := client.pl.Do(req)
	if err != nil {
		return nil, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK, http.StatusAccepted, http.StatusNoContent) {
		return nil, runtime.NewResponseError(resp)
	}
	return resp, nil
}

// deleteCreateRequest creates the Delete request.
func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientBeginDeleteOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}"
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if workspaceName == "" {
		return nil, errors.New("parameter workspaceName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName))
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	req, err := runtime.NewRequest(ctx, http.MethodDelete, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2021-12-01-preview")
	if options != nil && options.Force != nil {
		reqQP.Set("force", strconv.FormatBool(*options.Force))
	}
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, nil
}

// Get - Gets a workspace instance.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
// resourceGroupName - The name of the resource group. The name is case insensitive.
// workspaceName - The name of the workspace.
// options - WorkspacesClientGetOptions contains the optional parameters for the WorkspacesClient.Get method.
func (client *WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (WorkspacesClientGetResponse, error) {
	req, err := client.getCreateRequest(ctx, resourceGroupName, workspaceName, options)
	if err != nil {
		return WorkspacesClientGetResponse{}, err
	}
	resp, err := client.pl.Do(req)
	if err != nil {
		return WorkspacesClientGetResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return WorkspacesClientGetResponse{}, runtime.NewResponseError(resp)
	}
	return client.getHandleResponse(resp)
}

// getCreateRequest creates the Get request.
func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, options *WorkspacesClientGetOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}"
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if workspaceName == "" {
		return nil, errors.New("parameter workspaceName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName))
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2021-12-01-preview")
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, nil
}

// getHandleResponse handles the Get response.
func (client *WorkspacesClient) getHandleResponse(resp *http.Response) (WorkspacesClientGetResponse, error) {
	result := WorkspacesClientGetResponse{}
	if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil {
		return WorkspacesClientGetResponse{}, err
	}
	return result, nil
}

// NewListPager - Gets the workspaces in a subscription.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
// options - WorkspacesClientListOptions contains the optional parameters for the WorkspacesClient.List method.
func (client *WorkspacesClient) NewListPager(options *WorkspacesClientListOptions) *runtime.Pager[WorkspacesClientListResponse] {
	return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListResponse]{
		More: func(page WorkspacesClientListResponse) bool {
			return false
		},
		Fetcher: func(ctx context.Context, page *WorkspacesClientListResponse) (WorkspacesClientListResponse, error) {
			req, err := client.listCreateRequest(ctx, options)
			if err != nil {
				return WorkspacesClientListResponse{}, err
			}
			resp, err := client.pl.Do(req)
			if err != nil {
				return WorkspacesClientListResponse{}, err
			}
			if !runtime.HasStatusCode(resp, http.StatusOK) {
				return WorkspacesClientListResponse{}, runtime.NewResponseError(resp)
			}
			return client.listHandleResponse(resp)
		},
	})
}

// listCreateRequest creates the List request.
func (client *WorkspacesClient) listCreateRequest(ctx context.Context, options *WorkspacesClientListOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces"
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2021-12-01-preview")
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, nil
}

// listHandleResponse handles the List response.
func (client *WorkspacesClient) listHandleResponse(resp *http.Response) (WorkspacesClientListResponse, error) {
	result := WorkspacesClientListResponse{}
	if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceListResult); err != nil {
		return WorkspacesClientListResponse{}, err
	}
	return result, nil
}

// NewListByResourceGroupPager - Gets workspaces in a resource group.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
// resourceGroupName - The name of the resource group. The name is case insensitive.
// options - WorkspacesClientListByResourceGroupOptions contains the optional parameters for the WorkspacesClient.ListByResourceGroup
// method.
func (client *WorkspacesClient) NewListByResourceGroupPager(resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) *runtime.Pager[WorkspacesClientListByResourceGroupResponse] {
	return runtime.NewPager(runtime.PagingHandler[WorkspacesClientListByResourceGroupResponse]{
		More: func(page WorkspacesClientListByResourceGroupResponse) bool {
			return false
		},
		Fetcher: func(ctx context.Context, page *WorkspacesClientListByResourceGroupResponse) (WorkspacesClientListByResourceGroupResponse, error) {
			req, err := client.listByResourceGroupCreateRequest(ctx, resourceGroupName, options)
			if err != nil {
				return WorkspacesClientListByResourceGroupResponse{}, err
			}
			resp, err := client.pl.Do(req)
			if err != nil {
				return WorkspacesClientListByResourceGroupResponse{}, err
			}
			if !runtime.HasStatusCode(resp, http.StatusOK) {
				return WorkspacesClientListByResourceGroupResponse{}, runtime.NewResponseError(resp)
			}
			return client.listByResourceGroupHandleResponse(resp)
		},
	})
}

// listByResourceGroupCreateRequest creates the ListByResourceGroup request.
func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Context, resourceGroupName string, options *WorkspacesClientListByResourceGroupOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces"
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	req, err := runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2021-12-01-preview")
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, nil
}

// listByResourceGroupHandleResponse handles the ListByResourceGroup response.
func (client *WorkspacesClient) listByResourceGroupHandleResponse(resp *http.Response) (WorkspacesClientListByResourceGroupResponse, error) {
	result := WorkspacesClientListByResourceGroupResponse{}
	if err := runtime.UnmarshalAsJSON(resp, &result.WorkspaceListResult); err != nil {
		return WorkspacesClientListByResourceGroupResponse{}, err
	}
	return result, nil
}

// Update - Updates a workspace.
// If the operation fails it returns an *azcore.ResponseError type.
// Generated from API version 2021-12-01-preview
// resourceGroupName - The name of the resource group. The name is case insensitive.
// workspaceName - The name of the workspace.
// parameters - The parameters required to patch a workspace.
// options - WorkspacesClientUpdateOptions contains the optional parameters for the WorkspacesClient.Update method.
func (client *WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspacePatch, options *WorkspacesClientUpdateOptions) (WorkspacesClientUpdateResponse, error) {
	req, err := client.updateCreateRequest(ctx, resourceGroupName, workspaceName, parameters, options)
	if err != nil {
		return WorkspacesClientUpdateResponse{}, err
	}
	resp, err := client.pl.Do(req)
	if err != nil {
		return WorkspacesClientUpdateResponse{}, err
	}
	if !runtime.HasStatusCode(resp, http.StatusOK) {
		return WorkspacesClientUpdateResponse{}, runtime.NewResponseError(resp)
	}
	return client.updateHandleResponse(resp)
}

// updateCreateRequest creates the Update request.
func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, parameters WorkspacePatch, options *WorkspacesClientUpdateOptions) (*policy.Request, error) {
	urlPath := "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}"
	if resourceGroupName == "" {
		return nil, errors.New("parameter resourceGroupName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName))
	if workspaceName == "" {
		return nil, errors.New("parameter workspaceName cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName))
	if client.subscriptionID == "" {
		return nil, errors.New("parameter client.subscriptionID cannot be empty")
	}
	urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID))
	req, err := runtime.NewRequest(ctx, http.MethodPatch, runtime.JoinPaths(client.host, urlPath))
	if err != nil {
		return nil, err
	}
	reqQP := req.Raw().URL.Query()
	reqQP.Set("api-version", "2021-12-01-preview")
	req.Raw().URL.RawQuery = reqQP.Encode()
	req.Raw().Header["Accept"] = []string{"application/json"}
	return req, runtime.MarshalAsJSON(req, parameters)
}

// updateHandleResponse handles the Update response.
func (client *WorkspacesClient) updateHandleResponse(resp *http.Response) (WorkspacesClientUpdateResponse, error) {
	result := WorkspacesClientUpdateResponse{}
	if err := runtime.UnmarshalAsJSON(resp, &result.Workspace); err != nil {
		return WorkspacesClientUpdateResponse{}, err
	}
	return result, nil
}


text:
class DisplaySettingsDialog : public QDialog
{
    Q_OBJECT

public:
    DisplaySettingsDialog(QWidget* parent = 0);

private slots:
    void apply();
    void refresh();

    void fillScreens();
    void selectScreen(int screenNumber);
    void fillResolutions();
    void fillRefreshRates();
    void fillColorDepths();

    void updateUi(bool init = false);

private:
    Ui::DisplaySettingsDialog ui;
    QxtScreen screen;
};

#endif // DISPLAYSETTINGSDIALOG_H


text:
/* Licensed to Oleg Tsemaylo under the MIT license.
 * Refer to the LICENSE.txt file in the project root for more information.
 */

/**
 * @file   RuleDivRV.h
 *
 * Grammar rule to handle division operation for right hand operand (interface definition).
 *
 * @since 15.08.2017
 * @author agor
 */

#ifndef RULEDIVRV_H
#define RULEDIVRV_H

#include "RuleOperations.h"

class Div;

class RuleDivRV : public RuleOperations<Div, true> {
private:
    bool applyRule(const ParserStack::const_iterator op, const ParserStack::const_iterator arg, ParserStack &stack) const throw (ParsingException) final;
};

#endif /* RULEDIVRV_H */


text:
var path = require('path');
var morgan = require('morgan');
var bodyParser = require('body-parser');

module.exports = function (app, express) {
  // set up basic middleware
  app.use(morgan('dev'));
  app.use(bodyParser.urlencoded({extended: true}));
  app.use(bodyParser.json());
  app.use(express.static(path.join(__dirname + '/../../client')));

  // define routers
  var carsRouter = express.Router();

  // api paths for various routes
  app.use('/api/cars', carsRouter);

  // require necessary route files
  require('../api/cars/carRoutes.js')(carsRouter);
};


text:
package org.multibit.hd.brit.services;

import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ListenableFuture;
import org.bitcoinj.core.*;
import org.bitcoinj.params.MainNetParams;
import org.bitcoinj.store.BlockStore;
import org.bitcoinj.store.MemoryBlockStore;
import org.bitcoinj.utils.Threading;
import org.bitcoinj.wallet.DeterministicSeed;
import org.bitcoinj.wallet.KeyChainGroup;
import org.bouncycastle.openpgp.PGPPublicKey;
import org.joda.time.DateTime;
import org.junit.Before;
import org.junit.Test;
import org.multibit.hd.brit.crypto.PGPUtils;
import org.multibit.hd.brit.crypto.PGPUtilsTest;
import org.multibit.hd.brit.dto.BRITWalletIdTest;
import org.multibit.hd.brit.dto.FeeState;
import org.multibit.hd.brit.extensions.MatcherResponseWalletExtension;
import org.multibit.hd.brit.seed_phrase.Bip39SeedPhraseGenerator;
import org.multibit.hd.brit.seed_phrase.SeedPhraseGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.crypto.params.KeyParameter;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.InetAddress;
import java.net.URL;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

import static org.bitcoinj.core.Coin.parseCoin;
import static org.fest.assertions.Assertions.assertThat;

public class FeeServicesTest {

  private static final Logger log = LoggerFactory.getLogger(FeeServicesTest.class);

  /**
   * Always use MainNet in BRIT
   */
  private static final NetworkParameters NETWORK_PARAMETERS = MainNetParams.get();

  private final String WALLET_PASSWORD = "horatio nelson 123";
  private Wallet wallet1;

  /**
   * An address in the test wallet1
   */
  private Address toAddress1;

  /**
   * An address that is not in the wallet1 and not a BRIT fee address
   */
  private Address nonFeeDestinationAddress;

  protected BlockChain chain;
  protected BlockStore blockStore;

  private PGPPublicKey encryptionKey;

  /**
   * example.org is an IETF reserved URL that will resolve (thus testing the HTTP transport) but not return useful bytes
   */
  private static final String DUMMY_MATCHER_URL = "http://example.org";

  private byte[] seed;

  ECKey toKey1;

  @Before
  public void setUp() throws Exception {

    SeedPhraseGenerator seedGenerator = new Bip39SeedPhraseGenerator();
    seed = seedGenerator.convertToSeed(Bip39SeedPhraseGenerator.split(BRITWalletIdTest.SEED_PHRASE_1));

    // Create the wallet 'wallet1'
    createWallet(Bip39SeedPhraseGenerator.split(BRITWalletIdTest.SEED_PHRASE_1));

    toKey1 = wallet1.freshReceiveKey();
    toAddress1 = toKey1.toAddress(NETWORK_PARAMETERS);

    // Read the manually created public keyring in the test directory to find a public key suitable for encryption
    File publicKeyRingFile = PGPUtilsTest.makeFile(PGPUtilsTest.TEST_MATCHER_PUBLIC_KEYRING_FILE);
    log.debug("Loading public keyring from '" + publicKeyRingFile.getAbsolutePath() + "'");
    FileInputStream publicKeyRingInputStream = new FileInputStream(publicKeyRingFile);
    encryptionKey = PGPUtils.readPublicKey(publicKeyRingInputStream);
    assertThat(encryptionKey).isNotNull();

    blockStore = new MemoryBlockStore(NETWORK_PARAMETERS);
    chain = new BlockChain(NETWORK_PARAMETERS, wallet1, blockStore);

    nonFeeDestinationAddress = new Address(NETWORK_PARAMETERS, "1CQH7Hp9nNQVDcKtFVwbA8tqPMNWDBvqE3"); // Any old address that is not a fee address
  }

  @Test
  public void testCalculateFeeStateWithDummyURL() throws Exception {

    // Get the FeeService
    FeeService feeService = new FeeService(encryptionKey, new URL(DUMMY_MATCHER_URL));
    assertThat(feeService).isNotNull();

    // Perform an exchange with the BRIT Matcher to get the list of fee addresses
    feeService.performExchangeWithMatcher(seed, wallet1);
    assertThat(wallet1.getExtensions().get(MatcherResponseWalletExtension.MATCHER_RESPONSE_WALLET_EXTENSION_ID)).isNotNull();

    // Calculate the fee state for an empty wallet
    FeeState feeState = feeService.calculateFeeState(wallet1, false);
    assertThat(feeState).isNotNull();

    // We are using a dummy Matcher so will always fall back to the hardwired addresses
    Set<Address> possibleNextFeeAddresses = feeService.getHardwiredFeeAddresses();

    checkFeeState(feeState, true, 0, Coin.ZERO, FeeService.FEE_PER_SEND, possibleNextFeeAddresses);

    // Receive some bitcoin to the wallet1 address
    receiveATransaction(wallet1, toAddress1);

    final int NUMBER_OF_NON_FEE_SENDS = 40;
    for (int i = 0; i < NUMBER_OF_NON_FEE_SENDS; i++) {
      // Create a send to the non fee destination address
      // This should increment the send count and the fee owed
      Coin tenMillis = parseCoin("0.01");
      sendBitcoin(tenMillis, nonFeeDestinationAddress, null);

      feeState = feeService.calculateFeeState(wallet1, false);

      checkFeeState(feeState, true, 1 + i, FeeService.FEE_PER_SEND.multiply(i + 1), FeeService.FEE_PER_SEND, possibleNextFeeAddresses);
    }

    // Create another send to the FEE address
    // Pay the feeOwed and another fee amount (to pay for this send)
    // This should reset the amount owed and create another feeAddress
    sendBitcoin(feeState.getFeeOwed().add(FeeService.FEE_PER_SEND), feeState.getNextFeeAddress(), null);

    feeState = feeService.calculateFeeState(wallet1, false);
    checkFeeState(feeState, true, NUMBER_OF_NON_FEE_SENDS + 1, Coin.ZERO, FeeService.FEE_PER_SEND, possibleNextFeeAddresses);
  }

  @Test
  public void checkFeePerKB() {

    // Check minimum
    assertThat(Coin.valueOf(1000).equals(FeeService.MINIMUM_FEE_PER_KB)).isTrue();

    // Check default
    assertThat(Coin.valueOf(3000).equals(FeeService.DEFAULT_FEE_PER_KB)).isTrue();

    // Check maximum
    assertThat(Coin.valueOf(10000).equals(FeeService.MAXIMUM_FEE_PER_KB)).isTrue();

    // Check normalisation logic

    // Missing - set to default
    assertThat(FeeService.DEFAULT_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(0))).isTrue();

    // Too small
    assertThat(FeeService.MINIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(-1))).isTrue();
    assertThat(FeeService.MINIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(999))).isTrue();

    // Just right
    assertThat(Coin.valueOf(1234).equals(FeeService.normaliseRawFeePerKB(1234))).isTrue();

    // Too big
    assertThat(FeeService.MAXIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(10001))).isTrue();
    assertThat(FeeService.MAXIMUM_FEE_PER_KB.equals(FeeService.normaliseRawFeePerKB(123456))).isTrue();
   }

  private void checkFeeState(
    FeeState feeState,
    boolean expectedIsUsingHardwiredBRITAddress,
    int expectedCurrentNumberOfSends,
    Coin expectedFeeOwed,
    Coin expectedFeePerSendSatoshi,
    Set<Address> possibleNextFeeAddresses) {

    assertThat(feeState.isUsingHardwiredBRITAddresses() == expectedIsUsingHardwiredBRITAddress).isTrue();
    assertThat(feeState.getCurrentNumberOfSends()).isEqualTo(expectedCurrentNumberOfSends);
    assertThat(feeState.getFeeOwed()).isEqualTo(expectedFeeOwed);
    assertThat(feeState.getFeePerSendSatoshi()).isEqualTo(expectedFeePerSendSatoshi);
    assertThat(possibleNextFeeAddresses.contains(feeState.getNextFeeAddress())).isTrue();

    int upperLimitOfNextFeeSendCount = feeState.getCurrentNumberOfSends() + FeeService.NEXT_SEND_DELTA_UPPER_LIMIT - 1;

    // Verify limits
    assertThat(upperLimitOfNextFeeSendCount).isGreaterThanOrEqualTo(feeState.getNextFeeSendCount());
  }

  private void createWallet(List<String> mnemonicCode) throws Exception {
    DeterministicSeed deterministicSeed = new DeterministicSeed(mnemonicCode, null, "", DateTime.now().getMillis() / 1000);
    KeyChainGroup keyChainGroup = new KeyChainGroup(NETWORK_PARAMETERS, deterministicSeed);

    wallet1 = new Wallet(MainNetParams.get(), keyChainGroup);

  }

  private void receiveATransaction(Wallet wallet, Address toAddress) throws Exception {

    Coin v1 = parseCoin("1.0");
    final ListenableFuture<Coin> availFuture = wallet.getBalanceFuture(v1, Wallet.BalanceType.AVAILABLE);
    final ListenableFuture<Coin> estimatedFuture = wallet.getBalanceFuture(v1, Wallet.BalanceType.ESTIMATED);
    assertThat(availFuture.isDone()).isFalse();
    assertThat(estimatedFuture.isDone()).isFalse();

    // Send some pending coins to the wallet.
    Transaction t1 = sendMoneyToWallet(wallet, v1, toAddress);
    Threading.waitForUserCode();
    final ListenableFuture<TransactionConfidence> depthFuture = t1.getConfidence().getDepthFuture(1);
    assertThat(depthFuture.isDone()).isFalse();
    assertThat(v1).isEqualTo(wallet.getBalance(Wallet.BalanceType.ESTIMATED));

    // Our estimated balance has reached the requested level.
    assertThat(estimatedFuture.isDone()).isTrue();

  }

  private Transaction sendMoneyToWallet(Wallet wallet, Coin value, Address toAddress) throws IOException, VerificationException {

    Preconditions.checkNotNull(toAddress);

    // If the next line isn't compiling you probably need to update your bitcoinj !
    // createFakeTx has been moved !
    Transaction tx = org.bitcoinj.testing.FakeTxBuilder.createFakeTx(NETWORK_PARAMETERS, value, toAddress);
    // Mark it as coming from self as then it can be spent when pending
    tx.getConfidence().setSource(TransactionConfidence.Source.SELF);

    // Mark it as being seen by a couple of peers
    tx.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByAddress(new byte[]{1, 2, 3, 4})));
    tx.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByAddress(new byte[]{10, 2, 3, 4})));

    // Pending/broadcast tx.
    if (wallet.isPendingTransactionRelevant(tx)) {
      wallet.receivePending(tx, null);
    }

    return wallet.getTransaction(tx.getHash());  // Can be null if tx is a double spend that's otherwise irrelevant.

  }

  private static void broadcastAndCommit(Wallet wallet, Transaction t) throws Exception {

    final LinkedList<Transaction> txns = Lists.newLinkedList();
    wallet.addEventListener(
      new AbstractWalletEventListener() {
        @Override
        public void onCoinsSent(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
          txns.add(tx);
        }
      });

    t.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByAddress(new byte[]{1, 2, 3, 4})));
    t.getConfidence().markBroadcastBy(new PeerAddress(InetAddress.getByAddress(new byte[]{10, 2, 3, 4})));
    wallet.commitTx(t);
    Threading.waitForUserCode();

  }

  private void sendBitcoin(Coin amount, Address destinationAddress, KeyParameter aesKey) throws Exception {

    Wallet.SendRequest req = Wallet.SendRequest.to(destinationAddress, amount);
    req.aesKey = aesKey;
    req.fee = parseCoin("0.01");
    req.ensureMinRequiredFee = false;

    // Complete the transaction successfully.
    wallet1.completeTx(req);

    // Broadcast the transaction and commit.
    broadcastAndCommit(wallet1, req.tx);

  }
}


text:
<?php

/* NotificacionBundle:Persona:edit.html.twig */
class __TwigTemplate_5f15f1ff6439f62bc05b8de9a3cc2e109e6e68cbeae2bd5fc9ad98f2e4f20689 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("::base.html.twig");

        $this->blocks = array(
            'body' => array($this, 'block_body'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "::base.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_body($context, array $blocks = array())
    {
        // line 4
        echo "
Persona edit

    ";
        // line 6
        echo         $this->env->getExtension('form')->renderer->renderBlock((isset($context["edit_form"]) ? $context["edit_form"] : $this->getContext($context, "edit_form")), 'form');
        echo "

        env->getExtension('routing')->getPath("persona");
        echo "\">
            Back to the list

";
        // line 14
        echo         $this->env->getExtension('form')->renderer->renderBlock((isset($context["delete_form"]) ? $context["delete_form"] : $this->getContext($context, "delete_form")), 'form');
        echo "

";
    }

    public function getTemplateName()
    {
        return "NotificacionBundle:Persona:edit.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  49 => 14,  42 => 10,  35 => 6,  31 => 4,  28 => 3,);
    }
}


text:
**Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [cocos2d-x v3.3alpha0 Release Notes](#user-content-cocos2d-x-v33alpha0-release-notes)
- [Misc Information](#user-content-misc-information)
- [Requirements](#user-content-requirements)
	- [Runtime Requirements](#user-content-runtime-requirements)
	- [Compiler Requirements](#user-content-compiler-requirements)
	- [How to run tests](#user-content-how-to-run-tests)
		- [Mac OSX & iOS](#user-content-mac-osx--ios)
		- [Android](#user-content-android)
		- [Windows](#user-content-windows)
		- [Linux](#user-content-linux)
	- [How to start a new game](#user-content-how-to-start-a-new-game)
- [Highlights of v3.3alpha0](#user-content-highlights-of-v33alpha0)
- [Features in detail](#user-content-features-in-detail)
	- [Camera](#user-content-camera)
	- [Reskin](#user-content-reskin)
	- [Attachment](#user-content-attachment)
	- [Better support for FBX](#user-content-better-support-for-fbx)
	- [New fbx-conv](#user-content-new-fbx-conv)
	- [AABB, OBB and Ray](#user-content-aabb-obb-and-ray)
	- [ui::Scale9Sprite](#user-content-uiscale9sprite)
	- [c++11 random support](#user-content-c11-random-support)
	- [RenderTexture save function](#user-content-rendertexture-save-function)
	- [Primitive](#user-content-primitive)
	- [Consistent way to set GL context attributes](#user-content-consistent-way-to-set-gl-context-attributes)
	- [Only two libraries left](#user-content-only-two-libraries-left)

# Misc Information

* Full Changelog: https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.3alpha0/CHANGELOG
* v3.0 Release Notes can be found here: [v3.0 Release Notes](https://github.com/cocos2d/cocos2d-x/blob/cocos2d-x-3.0/docs/RELEASE_NOTES.md)

# Requirements

## Runtime Requirements

* Android 2.3 or newer
* iOS 5.0 or newer
* OS X 10.7 or newer
* Windows 7 or newer
* Windows Phone 8 or newer
* Linux Ubuntu 14.04 or newer
* ~~Browsers via Emscripten~~ N/A for the moment

## Compiler Requirements

* Xcode 5.1 or newer for iOS or Mac
* gcc 4.9 or newer for Linux
* ndk-r9d for Android
* Visual Studio 2012  or newer for Windows (win32)
* Visual Studio 2012  or newer for Windows Phone 8

## How to run tests

### Mac OSX & iOS

* Enter `cocos2d-x/build` folder, open `cocos2d_test.xcodeproj`
* Select `iOS` or `OS X` target in scheme toolbar
* Click `run` button

### Android

You can run the samples...

**Using command line:**

    $ cd cocos2d-x
    $ ./setup.py
    $ cd build
    $ ./android-build.py cpp-empty-test -p 10
    $ adb install cocos2d-x/tests/cpp-empty-test/proj.android/bin/CppEmptyTest-debug.apk

Then click item on Android device to run tests. Available value of `-p` is the API level, cocos2d-x supports from level 10.

**Using Eclipse:**

    $ cd cocos2d-x
    $ ./setup.py
    $ cd build
    $ ./android-build.py cpp-empty-test -p 10

Then

* Import cocos2d-x Android project into Eclipse, the path used to import is `cocos/2d/platform/android`
* Import `cpp-empty-test` Android project into Eclipse, the path used to import is `tests/cpp-empty-test/proj.android`
* Build `cpp-empty-test` Android project and run

### Windows

* Enter `cocos2d-x/build`, and open `cocos2d-win32.vs2012.sln`
* Select `cpp-empty-test` as running target
* Click run button

### Linux

    $ cd cocos2d-x/build
    $ ./install-deps-linux.sh
    $ cd ../..

Then

    $ mkdir build
    $ cd build
    $ cmake ../cocos2d-x
    $ make -j4

Run

    $ cd bin/cpp-empty-test
    $ ./cpp-empty-test

## How to start a new game

Please refer to this document: [ReadMe](../README.md)

# Highlights of v3.3alpha0

* 3d: `Camera`, 'Reskin', 'Attachment', 'Better support for FBX', 'New fbx-conv', `AABB`, `OBB` and `Ray`
* ui: added `Scale9Sprite`
* FileUitls: added `isDirectoryExist()`, `createDirectory()`, `removeDirectory()`, `removeFile()`, `renameFile()` and `getFileSize()`
* Device: added `setKeepScreenOn()` on iOS and Android
* Added c++11 random support
* RenderTexture: added a call back function for `saveToFile()`
* Primitive: Support Points, Lines and Triagles for rendering
* SpriteFrameCache: support loading from plist file content data
* Added a consistent way to set GL context attributes for all platforms
* Only two libraries in cocos2d-x, one for c++ codes, another one for lua-binding codes
* Many other small features added and many bugs fixed

# Features in detail

## Camera

This version of camera is powerful then previous one. And you can add it as a child anywhere. If you want to let a Node to be visited by a camera, Node's camera mask should include Camera's flag:

```c++
// let sprite to be visited by a camera
auto sprite = Sprite::create("myFile.png");
sprite->setCameraMask(CameraFlag::USER1);
auto camera = Camera::createPerspective(60, winSize.width/winSize.height, 1, 1000);
camera->setCameraFlag(CameraFlag::USER1);
scene->addChild(camera);
```

If you have many Nodes that want to be visited by a camera, there is a convenient way:

```c++
auto layer = Layer::create();
auto sprite1 = Sprite::create();
auto sprite2 = Sprite::create();
layer->addChild(sprite1);
layer->addChild(sprite2);
// it will set camera mask for all its children
layer->setCameraMask(CameraFlg::USER1);

auto camera = Camera::createPerspective();
camera->setCameraFlag(CameraFlag::USER1);
scene->addChild(camera);
```

Full test case please  refer to `tests/cpp-tests/res/Camera3DTest/Camera3DTest.cpp`.

## Reskin

It is a powerful feature, all the user change the appearance of character.

For example, there a model named girl.c3b, which has two coats, coat0 and coat1.
The character's coat can be changed like this,

```c++
//load the girl from file
auto sprite3d = Sprite3D::create("girl.c3b");
//get the mesh named coat0
auto mesh0 = sprite3d->getMeshByName("coat0");
//you can change texture of this mesh if you like
mesh0->setTexture("cloth.png");
//you can change visibility for this mesh, too
mesh0->setVisible(true);
//hide coat1
auto mesh1 = sprite3d->getMeshByName("coat1");
mesh1->setVisible(false);
```

Full test case please refer to 'tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp'

## Attachment

Allows to attach a node to a bone

Usage,

```c++
auto sprite = Sprite3D::create("girl.c3b");
auto weapon = Sprite::create("weapon.c3b");
auto attachNode = sprite->getAttachNode("left_hand");
attachNode->addChild(weapon);
```

Full test case please refer to 'tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp'

## Better support for FBX

support multiple mesh
support multiple material
bones bind to each mesh limited to 40. But the FBX model can contain more meshes. So the model can contain much more bones.

## New fbx-conv

It can export more complex model, which contains multiple meshes and multiple materials.

## AABB, OBB and Ray

AABB means Axis Aligned Bounding Box
OBB means Oriented Bounding Box
Ray has a origin position and direction

Each Sprite3D or Mesh has its own AABB.
AABB and OBB can be picked by Ray.

Usage,

```c++
//get ray from camera
Vec3 nearP(location.x, location.y, -1.0f), farP(location.x, location.y, 1.0f);
auto size = Director::getInstance()->getWinSize();
camera->unproject(size, &nearP, &nearP);
camera->unproject(size, &farP, &farP);
ray._origin = nearP;
ray._direction = farP - nearP;
ray.intersects(sprite3d->getAABB( ) );
```

Full test case please refer to 'tests/cpp-tests/Classes/Spret3DTest/Sprite3DTest.cpp'

## ui::Scale9Sprite

Now we have implemented a new Scale9Sprite class under ui module. Its internal implementation is concise than the previous one plus more features.
The main reason of reimplementing this class is that the Scale9Sprite is heavily used in ui module. Now the ui module is not dependent from extension module.
By applying the new ui::Scale9Sprite, the code inside many widget classes are more cleaner and elegant.

We could manually toggle "slice 9" feature by one function call:

```c++
//ui::Scale9Sprite is slice 9 enabled on default
auto sprite = ui::Scale9Sprite::create("foo.png");
sprite->setScale9Enabled(false);
```

It also supports Flipping now.

```c++
auto sprite = ui::Scale9Sprite::create("bar.png");
sprite->setFlippedX(true);
sprite->setFlippedY(false);
```

Since the ui::Scale9Sprite is a Node rather than a Sprite, so you can't add it to a batch node. If you do want to do some actions on the internal sprite,
you could call `sprite->getSprite()` to access it.

Full test case please refer to `tests/cpp-tests/Classes/UITests/CocostudioGUITest/UIScale9SpriteTest.cpp`.

## c++11 random support

Since `rand()` is not good(refer to [this document](http://c-faq.com/lib/randrange.html)), we use c++11 random library to do generate random number, and provide a function to easily using:

```c++
int randInt = cocos2d::random(1, 10);
float randFloat = cocos2d::random(1.f, 10.f);
```

## RenderTexture save function

`RenderTexture::saveToFile()` will not save rendertexture when the function returns, because it just send render command to renderer. The file will be saved after render command is executed. It is not convenient if you want to use the saved file to do some work. So we added a parameter in `RenderTexture::saveToFile()` to set a call back function when the file is saved.

```c++
renderTexture->begin();
...
renderTexture->end();

renderTexture->saveToFile("myFile.png", true, callback);

```

## Primitive

`Primitive` is added to support `Points`,`Lines`,`Triangles` rendering. Previously, if we want to draw a custom geometry(sphere, line), we can only do this by using `CustomCommand`. Now, what is need is to create a Primitive, set datas, and use the corresponding `PrimitiveCommand` to draw the Primitive.

Here is a simple example of rendering a quad in `Sprite`.

1. create verexBuffer

	```c++
	auto vertexBuffer = VerexBuffer::create(sizeof(V3F_C4B_T2F), 4);
	vertexBuffer->updateVertices(&_quad, 4, 0);
	```

2. create vertexData

	```c++
	auto vertexData = VertexData::create();
	vertexData->addStream(vertexBuffer, VertexStreamAttribute(0, VERTEX_ATTRIB_POSITION, GL_FLOAT, 3, fasle));
	vertexData->addStream(vertexBuffer, VertexStreamAttribute(12, VERTEX_ATTRIB_COLOR, GL_UNSIGNED_BTYE, 4, true));
	vertexData->addStream(vertexBuffer, VertexStreamAttribute(16, VERTEX_ATTRIB_TEX_COORD, GL_FLOAT, 2, fasle));
	```
3. create IndexBuffer

	```c++
	auto indexBuffer = IndexBuffer::create(IndexType::INDEX_TYPE_SHORT_16, 6);
	short indices[6] = {0,1,2,3,2,1};
	indexBuffer->updateIndices(indices,6, 0);
	```
4. create primitive

	```c++
	auto primitve = Primitive::create(vertexData, indexBuffer, GL_TRIANGLES);
	primitive->setStart(0);
	primitive->setCount(6);
	```
5. add command to renderer

	```c++
	_command->init(globalZorder,textureID, glprogramState, blend, primitve, modelViewMatrix);
	renderer->addCommand(&_command);
	```

Primitive supports three typs of primitives (POINTS, LINES, TRIANGLES), vertex and index sharing, multiple streams. It has some constrains:

1. The size of vertex and index Buffer is fixed, which means data must be pre allocated.
2. Batching is not supported.

## Consistent way to set GL context attributes

Now you can set GL context attributes by override `Application::initGLContextAttrs()`, then set GL context attributes there.

```c++
void AppDelegate::initGLContextAttrs()
{
    // r:8 g:8 a:8 depth:24 stencil:8
    GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8};
    GLView::setGLContextAttrs(glContextAttrs);
}
```

Now can only support setting bits of `r`, `g`, `b`, `a`, `depth buffer` and `stencil buffer`. We will support other attributes if needed.

## Only two libraries left

Now there are two libraries left: one for all c++ codes and another one for lua-bindings codes.

If you are developing with c++, you only have to link to `libcocos2d`. `libcocos2d` includes all c++ codes:

* cocos2d(including 2d and 3d)
* network
* cocosstudio
* ui
* cocosbuilder
* spine
* chipmunk
* box2d
* ...

Not used codes will be stripped by linker.

If you are developing with lua, you should link to `libcocos2d` and `libluacocos2d`. You can comment codes in `lua_module_register.h` if you don't want to some module.

```c++
int lua_module_register(lua_State* L)
{
    register_cocosdenshion_module(L); // comment this line to remove cocosdenshion
    register_network_module(L);       // comment this line to remove network
    register_cocosbuilder_module(L);  // comment this line to remove cocosbuilder
    register_cocostudio_module(L);    // comment this line to remove cocostudio
    register_extension_module(L);     // comment this line to remove extension
    register_ui_moudle(L);            // comment this line to remove ui
    register_spine_module(L);         // comment this line to remove spine
    register_cocos3d_module(L);       // comment this line to remove 3d
    return 1;
}
```


text:
package org.apereo.cas.support.events.listener;

import org.apereo.cas.configuration.CasConfigurationPropertiesEnvironmentManager;
import org.apereo.cas.support.events.config.CasConfigurationModifiedEvent;

import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.cloud.context.refresh.ContextRefresher;
import org.springframework.context.ApplicationContext;
import org.springframework.context.event.EventListener;

import java.util.ArrayList;
import java.util.Collection;

/**
 * This is {@link CasConfigurationEventListener}.
 *
 * @author Misagh Moayyed
 * @since 5.1.0
 */
@Slf4j
public class CasConfigurationEventListener {

    private final CasConfigurationPropertiesEnvironmentManager configurationPropertiesEnvironmentManager;
    @Autowired
    private ConfigurationPropertiesBindingPostProcessor binder;
    @Autowired
    private ObjectProvider<ContextRefresher> contextRefresher;
    @Autowired
    private ApplicationContext applicationContext;

    public CasConfigurationEventListener(final CasConfigurationPropertiesEnvironmentManager configurationPropertiesEnvironmentManager) {
        this.configurationPropertiesEnvironmentManager = configurationPropertiesEnvironmentManager;
    }

    /**
     * Handle refresh event when issued to this CAS server locally.
     *
     * @param event the event
     */
    @EventListener
    public void handleRefreshEvent(final EnvironmentChangeEvent event) {
        LOGGER.debug("Received event [{}]", event);
        rebind();
    }

    /**
     * Handle configuration modified event.
     *
     * @param event the event
     */
    @EventListener
    public void handleConfigurationModifiedEvent(final CasConfigurationModifiedEvent event) {
        if (this.contextRefresher == null) {
            LOGGER.warn("Unable to refresh application context, since no refresher is available");
            return;
        }

        if (event.isEligibleForContextRefresh()) {
            LOGGER.info("Received event [{}]. Refreshing CAS configuration...", event);
            Collection<String> keys = null;
            try {
                val refresher = this.contextRefresher.getIfAvailable();
                if (refresher != null) {
                    keys = refresher.refresh();
                    LOGGER.debug("Refreshed the following settings: [{}].", keys);
                }
            } catch (final Exception e) {
                LOGGER.trace(e.getMessage(), e);
            } finally {
                rebind();
                LOGGER.info("CAS finished rebinding configuration with new settings [{}]",
                    ObjectUtils.defaultIfNull(keys, new ArrayList<>(0)));
            }
        }
    }

    private void rebind() {
        LOGGER.info("Refreshing CAS configuration. Stand by...");
        if (configurationPropertiesEnvironmentManager != null) {
            configurationPropertiesEnvironmentManager.rebindCasConfigurationProperties(this.applicationContext);
        } else {
            CasConfigurationPropertiesEnvironmentManager.rebindCasConfigurationProperties(this.binder, this.applicationContext);
        }
    }
}


text:
ACCEPTED

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

#### Published in
null

#### Original name
Ichnanthus standleyi Hitchc.

### Remarks
null


text:
using System;

public class Program
{
    public static void Main()
    {
        double width = double.Parse(Console.ReadLine());
        double hight = double.Parse(Console.ReadLine());
        double perimeter = (2 * width) + (2 * hight);
        double area = width * hight;
        double diagonal = Math.Sqrt((width*width)+(hight*hight));
        Console.WriteLine(perimeter);
        Console.WriteLine(area);
        Console.WriteLine(diagonal);

    }
}