text:
package com.badlogic.gdx.tests.g3d.shadows.system.realistic;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.graphics.g3d.Attributes;
import com.badlogic.gdx.graphics.g3d.Environment;
import com.badlogic.gdx.graphics.g3d.Renderable;
import com.badlogic.gdx.graphics.g3d.attributes.DirectionalLightsAttribute;
import com.badlogic.gdx.graphics.g3d.attributes.SpotLightsAttribute;
import com.badlogic.gdx.graphics.g3d.environment.DirectionalLight;
import com.badlogic.gdx.graphics.g3d.environment.SpotLight;
import com.badlogic.gdx.graphics.g3d.shaders.DefaultShader;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
import com.badlogic.gdx.tests.g3d.shadows.system.BaseShadowSystem.LightProperties;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.ObjectMap;

/** This shader is used by the realistic shadow system. This shader supports normal mapping and specular mapping
 * @author realitix */
public class MainShader extends DefaultShader {
	public static class Config extends DefaultShader.Config {
		public RealisticShadowSystem shadowSystem;

		public Config (RealisticShadowSystem shadowSystem) {
			super();
			numBones = 12;
			numPointLights = 2;
			numSpotLights = 5;
			numDirectionalLights = 2;
			this.shadowSystem = shadowSystem;
		}
	}

	/** **** Directional shadow **** */
	protected final int u_dirShadows0uvTransform = register(new Uniform("u_dirShadows[0].uvTransform"));
	protected final int u_dirShadows1uvTransform = register(new Uniform("u_dirShadows[1].uvTransform"));

	protected int dirShadowsLoc;
	protected int dirShadowsUvTransformOffset;
	protected int dirShadowsSize;

	// Shadow projViewTrans
	protected int u_dirShadowMapProjViewTrans0 = register(new Uniform("u_dirShadowMapProjViewTrans[0]"));
	protected int u_dirShadowMapProjViewTrans1 = register(new Uniform("u_dirShadowMapProjViewTrans[1]"));
	protected int dirShadowMapProjViewTransLoc;
	protected int dirShadowMapProjViewTransSize;

	// Shadow UVTransform
	protected int u_dirShadowMapUVTransform0 = register(new Uniform("u_dirShadowMapUVTransform[0]"));
	protected int u_dirShadowMapUVTransform1 = register(new Uniform("u_dirShadowMapUVTransform[1]"));
	protected int dirShadowMapUVTransformLoc;
	protected int dirShadowMapUVTransformSize;

	/** **** Spot shadow **** */
	protected final int u_spotShadows0uvTransform = register(new Uniform("u_spotShadows[0].uvTransform"));
	protected final int u_spotShadows1uvTransform = register(new Uniform("u_spotShadows[1].uvTransform"));

	protected int spotShadowsLoc;
	protected int spotShadowsUvTransformOffset;
	protected int spotShadowsSize;

	// Shadow projViewTrans
	protected int u_spotShadowMapProjViewTrans0 = register(new Uniform("u_spotShadowMapProjViewTrans[0]"));
	protected int u_spotShadowMapProjViewTrans1 = register(new Uniform("u_spotShadowMapProjViewTrans[1]"));
	protected int spotShadowMapProjViewTransLoc;
	protected int spotShadowMapProjViewTransSize;

	// Shadow UVTransform
	protected int u_spotShadowMapUVTransform0 = register(new Uniform("u_spotShadowMapUVTransform[0]"));
	protected int u_spotShadowMapUVTransform1 = register(new Uniform("u_spotShadowMapUVTransform[1]"));
	protected int spotShadowMapUVTransformLoc;
	protected int spotShadowMapUVTransformSize;

	protected RealisticShadowSystem shadowSystem;

	private static String defaultVertexShader = null;

	public static String getDefaultVertexShader () {
		if (defaultVertexShader == null) defaultVertexShader = Gdx.files
			.classpath("com/badlogic/gdx/tests/g3d/shadows/system/realistic/main.vertex.glsl").readString();
		return defaultVertexShader;
	}

	private static String defaultFragmentShader = null;

	public static String getDefaultFragmentShader () {
		if (defaultFragmentShader == null) defaultFragmentShader = Gdx.files
			.classpath("com/badlogic/gdx/tests/g3d/shadows/system/realistic/main.fragment.glsl").readString();
		return defaultFragmentShader;
	}

	public static String createPrefix (final Renderable renderable, final Config config) {
		return DefaultShader.createPrefix(renderable, config);
	}

	public MainShader (final Renderable renderable, final Config config) {
		this(renderable, config, createPrefix(renderable, config));
	}

	public MainShader (final Renderable renderable, final Config config, final String prefix) {
		this(renderable, config, prefix, getDefaultVertexShader(), getDefaultFragmentShader());
	}

	public MainShader (final Renderable renderable, final Config config, final String prefix, final String vertexShader,
		final String fragmentShader) {
		this(renderable, config, new ShaderProgram(prefix + vertexShader, prefix + fragmentShader));
	}

	public MainShader (final Renderable renderable, final Config config, final ShaderProgram shaderProgram) {
		super(renderable, config, shaderProgram);
		this.shadowSystem = config.shadowSystem;
	}

	@Override
	public void init () {
		super.init();

		// Directional Shadow
		dirShadowsLoc = loc(u_dirShadows0uvTransform);
		dirShadowsUvTransformOffset = loc(u_dirShadows0uvTransform) - dirShadowsLoc;
		dirShadowsSize = loc(u_dirShadows1uvTransform) - dirShadowsLoc;
		if (dirShadowsSize < 0) dirShadowsSize = 0;

		dirShadowMapProjViewTransLoc = loc(u_dirShadowMapProjViewTrans0);
		dirShadowMapProjViewTransSize = loc(u_dirShadowMapProjViewTrans1) - dirShadowMapProjViewTransLoc;

		dirShadowMapUVTransformLoc = loc(u_dirShadowMapUVTransform0);
		dirShadowMapUVTransformSize = loc(u_dirShadowMapUVTransform1) - dirShadowMapUVTransformLoc;

		// Spot Shadow
		spotShadowsLoc = loc(u_spotShadows0uvTransform);
		spotShadowsUvTransformOffset = loc(u_spotShadows0uvTransform) - spotShadowsLoc;
		spotShadowsSize = loc(u_spotShadows1uvTransform) - spotShadowsLoc;
		if (spotShadowsSize < 0) spotShadowsSize = 0;

		spotShadowMapProjViewTransLoc = loc(u_spotShadowMapProjViewTrans0);
		spotShadowMapProjViewTransSize = loc(u_spotShadowMapProjViewTrans1) - spotShadowMapProjViewTransLoc;

		spotShadowMapUVTransformLoc = loc(u_spotShadowMapUVTransform0);
		spotShadowMapUVTransformSize = loc(u_spotShadowMapUVTransform1) - spotShadowMapUVTransformLoc;
	}

	@Override
	protected void bindLights (final Renderable renderable, final Attributes attributes) {
		super.bindLights(renderable, attributes);
		final Environment environment = renderable.environment;

		bindDirectionalShadows(attributes);
		bindSpotShadows(attributes);

		if (shadowSystem.getTexture() != null) {
			set(u_shadowTexture, shadowSystem.getTexture());
		}
	}

	public void bindDirectionalShadows (final Attributes attributes) {
		final DirectionalLightsAttribute dla = attributes.get(DirectionalLightsAttribute.class, DirectionalLightsAttribute.Type);
		final Array<DirectionalLight> dirs = dla == null ? null : dla.lights;

		if (dirLightsLoc >= 0) {
			for (int i = 0; i < directionalLights.length; i++) {
				if (dirs == null || dirs.size <= i) {
					continue;
				}

				int idx = dirShadowsLoc + i * dirShadowsSize;

				// Shadow
				ObjectMap<DirectionalLight, LightProperties> dirCameras = shadowSystem.getDirectionalCameras();

				DirectionalLight dl = dirs.get(i);
				if (shadowSystem.hasLight(dl)) {
					// UVTransform
					final TextureRegion tr = dirCameras.get(dl).region;
					Camera cam = dirCameras.get(dl).camera;

					if (cam != null) {
						program.setUniformf(idx + dirShadowsUvTransformOffset, tr.getU(), tr.getV(), tr.getU2() - tr.getU(),
							tr.getV2() - tr.getV());

						// ProjViewTrans
						idx = dirShadowMapProjViewTransLoc + i * dirShadowMapProjViewTransSize;
						program.setUniformMatrix(idx, dirCameras.get(dl).camera.combined);
					}
				}

				if (dirLightsSize <= 0) break;
			}
		}
	}

	public void bindSpotShadows (final Attributes attributes) {
		final SpotLightsAttribute sla = attributes.get(SpotLightsAttribute.class, SpotLightsAttribute.Type);
		final Array<SpotLight> spots = sla == null ? null : sla.lights;

		if (spotLightsLoc >= 0) {
			for (int i = 0; i < spotLights.length; i++) {
				if (spots == null || spots.size <= i) {
					continue;
				}

				int idx = spotShadowsLoc + i * spotShadowsSize;

				// Shadow
				ObjectMap<SpotLight, LightProperties> spotCameras = shadowSystem.getSpotCameras();

				SpotLight sl = spots.get(i);
				if (shadowSystem.hasLight(sl)) {
					// UVTransform
					final TextureRegion tr = spotCameras.get(sl).region;
					Camera cam = spotCameras.get(sl).camera;

					if (cam != null) {
						program.setUniformf(idx + spotShadowsUvTransformOffset, tr.getU(), tr.getV(), tr.getU2() - tr.getU(),
							tr.getV2() - tr.getV());

						// ProjViewTrans
						idx = spotShadowMapProjViewTransLoc + i * spotShadowMapProjViewTransSize;
						program.setUniformMatrix(idx, spotCameras.get(sl).camera.combined);
					}
				}

				if (spotLightsSize <= 0) break;
			}
		}
	}
}


text:
"""
Utility functions.
"""
from __future__ import absolute_import

import dis
import time
import random
import inspect
import logging

logger = logging.getLogger(__name__)

def classname(cls):
    """Return the class name for the input class/object.

    Args:
        cls: A class or object.
    """
    if not inspect.isclass(cls):
        cls = type(cls)
    return cls.__name__

def code(func):
    """Return the __code__ for the input function."""
    return func.__code__

def numlines(func):
    """Return the number of lines in the input function."""
    lines = tuple(dis.findlinestarts(code(func)))
    first_line = lines[0][1]
    last_line  = lines[-1][1]
    return last_line - first_line + 1

def randsleep(min, max):
    """Sleep for a number of seconds between `min` and `max`.

    Args:
        min (float): The minimum number of seconds to sleep.
        max (float): The maximum number of seconds to sleep.
    """
    diff = max - min
    interval = min + (random.random() * diff)
    logger.info("Sleeping for %s seconds", interval)
    time.sleep(interval)

redpajama_set_name: RedPajamaGithub


text:
import { FlowData16 } from "../../";

export = FlowData16;


text:
typedef struct client_config {
    int tracker_poll_frequency; // in seconds
    int peer_threads;
    int peer_timeout; // in seconds
    char peer_id[20];
} client_config_t;

typedef struct client {
    list_t *peers; // list of peer_t*
    torrent_t *torrent;
    client_config_t config;

    tracker_t *trackers;
} client_t;

void client_init(client_t *c, client_config_t config, torrent_t *t);
void client_init_trackers(client_t *c);
void client_start_trackers(client_t *c);
void client_stop_trackers(client_t *c, bool force);
void client_start_peer_threads(client_t *c);

void client_find_peer(discovered_peer_t, void *handle);

void calculate_total_availability(client_t *c, int *p_have, int *p_total);


text:
<!DOCTYPE html>

    <meta name="google-site-verification" content="LlwEG4a_4dqQLyxCfNk84TUl1BE9cr8gOXbDMZ39ePU" />
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Dan Scodellaro's Resume">
    <meta name="author" content="Dan Scodellaro">
    <link rel="shortcut icon" href="assets/ico/favicon.ico">

    <title>Dan Scodellaro - Resume</title>

    <link href="assets/css/bootstrap.css" rel="stylesheet">

    <link href="assets/css/main.css" rel="stylesheet">

	<link rel="stylesheet" href="assets/css/font-awesome.min.css">

    <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Raleway:400,300,700' rel='stylesheet' type='text/css'>

Dan Scodellaro

Student | dan.scodellaro@gmail.com

ABOUT

I'm a Distinction-average student of Commerce and Economics with a passion for technology and several years experience in Customer Service. I'm interested in working on projects that impart firms with advanced technological capabilities and improve operational efficiency, as well as solving unique and complex problems. When I'm not at work or studying, I enjoy international travel, video games and reading the Economist.

 DOWNLOAD PDF

EDUCATION

<t>Bachelor of Commerce & Bachelor of Economics (Dual Degree)</t>

						University of New South Wales (UNSW)

Majors in Information Systems and Economics

Distinction average with a WAM of 77.154

Successfully completed the Graduate Advantage Program (GAP) in 2014

						4 Years Course

<sm>2012 – 2015</sm>

					<imp><sm>ONGOING</sm></imp>

<t>Higher School Certificate (HSC)</t>

						Australian International School Singapore (AISS)

ATAR of 95.90

Served as School Captain in 2011 following successive years in the SRC

						6 Years Course

<sm>2006 – 2011</sm>

TRAINING

<t>Shift Management Excellence</t>

                        McDonald's Australia

Awarded Bronze Hat – Voted as the greatest contributor to others' learning

<sm>2013</sm>

<t>Apply First Aid (Senior First Aid)</t>

                        St John's Ambulance Australia

<sm>2013</sm>

<t>Certificate III in Retail Operations</t>

                        McDonald's Australia

<sm>2013</sm>

EMPLOYMENT

<t>Customer Service Representative</t>

						Commonwealth Bank of Australia (Macquarie Centre)

Responsible for serving a diverse range of customers, maintaining and operating numerous pieces of specialised equipment and identifying sales opportunities in the best interests of customers

Recognised on numerous occasions for excellent service and going the extra mile to help colleagues as well as customers

<sm>2014 - Present</sm>

                    <imp><sm>ONGOING</sm></imp>

<t>Shift Supervisor</t>

						McDonald's Australia (Castle Hill)

Awarded Crew Person of the Year 2012 in recognition of exceptional customer service

Developed training materials for both crew and managers which reduced food waste and minimised damage to equipment

Progressed into Management in under 2 years, completing multiple qualifications in the process

<sm>2012 - 2014</sm>

<t>Private Tutor</t>

                        Kapsanis Family (Singapore)

Weekly 1-on-1 tuition sessions with "gifted and talented" students, as recognised by the school

Focusing on Mathematics and Literacy, also working together on school projects and music

Conclusion of tuition involved teaching the 3 boys how to build a computer from scratch

<sm>2010 - 2011</sm>

ROLES

<t>School Captain </t>

                        Australian International School Singapore

Led a culturally diverse team to organise charity events, chiefly the Red Cross Blood Drive, Musical Opportunities Extravaganza (Music Concert) and the International Culture Experience (Festival)

Participated in interview panels for the 2012 Captains team, as well as the new school principal

Represented the school publicly at the ANZAC Day Dawn Service (Kranji War Memorial) and meeting with the Australian Governor-General – Quentin Bryce

                        1 Year Position

<sm>2010 - 2011</sm>

PORTFOLIO

ANALYSIS OF AN OPEN INNOVATION PLATFORM

<more>A report on the new open innovation platform MLNP.tv, conducted as a class assignment for INFS3631 at UNSW. This report analyses MLNP.tv within the context of Osterwalder's Business Canvas and Allee's Value Network Map, concluding with a discussion of the nature of "openness" in the context of the platform. The accompanying 2-minute business pitch presentation slides are also available for download.

					 analysis
                     presentation </more>

CREATION OF AN OPEN INNOVATION PLATFORM

<more>A report on the proposed creation of an open innovation platform GetMeThat, conducted as a class assignment for INFS3631 at UNSW. A link to the startup's webpage can be found below (alternatively click the image above), and the accompanying report and presentation slides will be made available for download shortly. This was made in conjunction with Simon Grace, Lee Kadish, Greg Jacobson and Nugra Akbari.

                 project site
                 report
                 presentation </more>

BCOMM/BECON COURSE PLANNER

<more>A simple tool made in Excel for planning out my own university course. With any luck it can be of use to others planning their own courses. Also includes my latest academic results.

                 excel spreadsheet </more>

CONTACT

<t>Email</t>

                        dan.scodellaro@gmail.com

<t>Address</t>

						North Rocks, 2151

						Sydney, NSW

                        Australia.

<t>Phone</t>

						+61 4 7824 5333

                        +61 2 9871 5224

<sm>SOCIAL LINKS</sm>

Built using Bootsrap. Template available at BLACKTIE.CO


text:
namespace wuanLua.Test
{
	using NUnit.Framework;
	using System.Text;
	using UnityEngine;
	using wuanLua;

	[TestFixture]
	public class Test_LuaBind
	{
		LuaState _luaState;

		[OneTimeSetUp]
		public void Start()
		{
		}

		[OneTimeTearDown]
		public void End()
		{
		}

		[SetUp]
		public void PreTest()
		{
			_luaState = new LuaState();
		}

		[TearDown]
		public void PostTest()
		{
			_luaState.Dispose();
			_luaState = null;
		}

		[Test]
		public void AccessStaticMemberFunction()
		{
			GameObject go = new GameObject( "go" );
			Assert.AreEqual( "go", go.name );

			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject.Find( 'go' )
if go == nil then
	return -1
end

return 0
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 1, results.Length );
			Assert.AreEqual( 0, results[0] );
		}

		[Test]
		public void AccessStaticMemberFunctionInParent()
		{
			GameObject go = new GameObject( "go" );
			Assert.AreEqual( "go", go.name );

			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject.Find( 'go' )
GameObject.DestroyImmediate( go, true )
go = nil
			";
			_luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );
		}

		[Test]
		public void AccessConstructor()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject( 'go' )
if go == nil or go.name ~= 'go' then
	return -1
end

local go2 = GameObject()
if go2 == nil then
	return -2
end

return 0
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 1, results.Length );
			Assert.AreEqual( 0, results[0] );
		}

		[Test]
		public void AccessMemberFunctionInParent()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject( 'go' )
local name = go:ToString()
local instanceId = go:GetInstanceID()

return name, instanceId
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 2, results.Length );
			Assert.AreEqual( "go (UnityEngine.GameObject)", results[0] );
			Assert.IsTrue( results[1] is double );
		}

		[Test]
		public void PassTypeAsParam()
		{
			GameObject cameraGO = new GameObject( "Camera" );
			cameraGO.AddComponent<Camera>();

			const string LUA_CODE = @"
Camera = wutLua.ImportType( 'UnityEngine.Camera' )
Object = wutLua.ImportType( 'UnityEngine.Object' )

local camera = Object.FindObjectOfType( Camera )
local cameraGO = camera.gameObject
local cameraComponent = cameraGO:GetComponent( Camera )

return camera.enabled, camera, cameraComponent, camera == cameraComponent
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 4, results.Length );
			Assert.AreEqual( true, results[0] );
			Assert.AreEqual( true, results[1] == results[2] );
			Assert.AreEqual( true, results[3] );
		}

		[Test]
		public void PassEnumAsParam()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )
Space = wutLua.ImportType( 'UnityEngine.Space' )
Transform = wutLua.ImportType( 'UnityEngine.Transform' )

local go = GameObject( 'Parent' )
local transform = go.transform
transform:Rotate( 0, 0, 90, Space.Self )

return transform, Space.World
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 2, results.Length );
			Assert.AreEqual( 90f, ( results[0] as Transform ).eulerAngles.z );
			Assert.AreEqual( (int) Space.World, results[1] );
		}

		[Test]
		public void PassParamArray()
		{
			const string LUA_CODE = @"
Animation = wutLua.ImportType( 'UnityEngine.Animation' )
Camera = wutLua.ImportType( 'UnityEngine.Camera' )
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local cameraGO = GameObject( 'Camera', Camera, Animation )
local cameraComponent = cameraGO:GetComponent( Camera )
local cameraComponent2 = cameraGO:GetComponent( 'Camera' )

return cameraGO, cameraComponent, cameraComponent2, cameraComponent == cameraComponent2
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );
			GameObject cameraGO = results[0] as GameObject;

			Assert.AreEqual( 4, results.Length );
			Assert.AreSame( results[1], results[2] );
			Assert.AreSame( results[1], cameraGO.GetComponent<Camera>() );
			Assert.AreEqual( true, results[3] );
			Assert.IsNotNull( cameraGO.GetComponent<Animation>() );
		}

		[Test]
		public void PassArray()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )
Transform = wutLua.ImportType( 'UnityEngine.Transform' )

local parentGO = GameObject( 'Parent' )
local childGO = GameObject( 'Child' )
local child1GO = GameObject.Instantiate( childGO, parentGO.transform )
local child2GO = GameObject.Instantiate( childGO, parentGO.transform )
local child3GO = GameObject.Instantiate( childGO, child1GO.transform )
local childrenTransforms = parentGO:GetComponentsInChildren( Transform )

return childrenTransforms.Length
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 1, results.Length );
			Assert.AreEqual( 4, results[0] );
		}

		[Test]
		public void AccessMemberProperty()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject( 'go' )
local name = go.name
go.name = 'gogogo'

return go, name
			";
			object[] results = _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

			Assert.AreEqual( 2, results.Length );
			GameObject go = results[0] as GameObject;
			Assert.AreEqual( "gogogo", go.name );
			Assert.AreEqual( "go", results[1] );
		}

		[Test]
		//[ExpectedException( typeof( LuaException ) )]
		public void AccessInexistedMemberProperty()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject( 'go' )
local notExists = go.notExists
go.notExists = 123
			";
			Assert.Throws<LuaException>( () => _luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) ) );
		}

		[Test]
		public void TriggerObjectGC()
		{
			const string LUA_CODE = @"
GameObject = wutLua.ImportType( 'UnityEngine.GameObject' )

local go = GameObject()
local go2 = GameObject( 'go2' )

go = nil
go2 = nil

collectgarbage()
			";
			_luaState.DoBuffer( Encoding.UTF8.GetBytes( LUA_CODE ) );

//			Assert.AreEqual( 0, _luaState._objects.Count );
		}
	}
}


text:
template<class Archive>
void CharacterData::serialize(Archive &archive, uint32_t const version)
{
    if(version != CharacterData::class_version)
    {
        qCritical() << "Failed to serialize CharacterData, incompatible serialization format version " << version;
        return;
    }

    archive(cereal::make_nvp("Level",m_level));
    archive(cereal::make_nvp("CombatLevel",m_combat_level));
    archive(cereal::make_nvp("SecurityThreat",m_security_threat));
    archive(cereal::make_nvp("XP",m_experience_points));
    archive(cereal::make_nvp("Debt",m_experience_debt));
    archive(cereal::make_nvp("PatrolXP",m_experience_patrol));
    archive(cereal::make_nvp("Influence",m_influence));
    archive(cereal::make_nvp("HasTitles",m_has_titles));
    archive(cereal::make_nvp("ThePrefix",m_has_the_prefix));
    archive(cereal::make_nvp("Titles",m_titles));
    archive(cereal::make_nvp("BattleCry",m_battle_cry));
    archive(cereal::make_nvp("Description",m_character_description));
    archive(cereal::make_nvp("AFK",m_afk));
    archive(cereal::make_nvp("AfkMsg",m_afk_msg));
    archive(cereal::make_nvp("LFG",m_lfg));
    archive(cereal::make_nvp("Alignment",m_alignment));
    archive(cereal::make_nvp("LastCostumeID",m_current_costume_idx));
    archive(cereal::make_nvp("LastOnline",m_last_online));
    archive(cereal::make_nvp("Class",m_class_name));
    archive(cereal::make_nvp("Origin",m_origin_name));
    archive(cereal::make_nvp("SuperGroupCostume",m_has_sg_costume));
    archive(cereal::make_nvp("UsingSGCostume",m_using_sg_costume));
    archive(cereal::make_nvp("SideKick",m_sidekick));
    archive(cereal::make_nvp("FriendList",m_friendlist));
    archive(cereal::make_nvp("CurrentAttribs", m_current_attribs));
    archive(cereal::make_nvp("OnTaskForce", m_is_on_task_force));
    archive(cereal::make_nvp("PowerSets", m_powersets));
    archive(cereal::make_nvp("PowerTrayGroups", m_trays));
    archive(cereal::make_nvp("Inspirations", m_inspirations));
    archive(cereal::make_nvp("Enhancements", m_enhancements));

    archive(cereal::make_nvp("MaxInspirationCols", m_max_insp_cols));
    archive(cereal::make_nvp("MaxInspirationRows", m_max_insp_rows));
    archive(cereal::make_nvp("MaxEnhancementSlots", m_max_enhance_slots));
}

SPECIALIZE_CLASS_VERSIONED_SERIALIZATIONS(CharacterData)
CEREAL_CLASS_VERSION(CharacterData, CharacterData::class_version) // register PowerTrayGroup class version