text:
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'Project'
        db.create_table(u'backend_project', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
        ))
        db.send_create_signal(u'backend', ['Project'])

        # Adding model 'Dictionary'
        db.create_table(u'backend_dictionary', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('project', self.gf('django.db.models.fields.related.ForeignKey')(related_name='dictionaries', to=orm['backend.Project'])),
        ))
        db.send_create_signal(u'backend', ['Dictionary'])

        # Adding model 'PartOfSpeech'
        db.create_table(u'backend_partofspeech', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=40)),
        ))
        db.send_create_signal(u'backend', ['PartOfSpeech'])

        # Adding model 'Gloss'
        db.create_table(u'backend_gloss', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('primary', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('secondary', self.gf('django.db.models.fields.CharField')(max_length=50)),
            ('pos', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['backend.PartOfSpeech'])),
            ('dictionary', self.gf('django.db.models.fields.related.ForeignKey')(related_name='glosses', to=orm['backend.Dictionary'])),
            ('field_tip', self.gf('django.db.models.fields.TextField')()),
            ('comment_tip', self.gf('django.db.models.fields.TextField')()),
            ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal(u'backend', ['Gloss'])

        # Adding model 'SortOrder'
        db.create_table(u'backend_sortorder', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('dictionary', self.gf('django.db.models.fields.related.ForeignKey')(related_name='sort_orders', to=orm['backend.Dictionary'])),
        ))
        db.send_create_signal(u'backend', ['SortOrder'])

        # Adding model 'SortPosition'
        db.create_table(u'backend_sortposition', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('sort', self.gf('django.db.models.fields.related.ForeignKey')(related_name='positions', to=orm['backend.SortOrder'])),
        ))
        db.send_create_signal(u'backend', ['SortPosition'])

        # Adding model 'Survey'
        db.create_table(u'backend_survey', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('title', self.gf('django.db.models.fields.TextField')()),
            ('dictionary', self.gf('django.db.models.fields.related.ForeignKey')(related_name='surveys', to=orm['backend.Dictionary'])),
        ))
        db.send_create_signal(u'backend', ['Survey'])

        # Adding model 'Variety'
        db.create_table(u'backend_variety', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('survey', self.gf('django.db.models.fields.related.ForeignKey')(related_name='varieties', to=orm['backend.Survey'])),
        ))
        db.send_create_signal(u'backend', ['Variety'])

        # Adding model 'Transcription'
        db.create_table(u'backend_transcription', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('ipa', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('gloss', self.gf('django.db.models.fields.related.ForeignKey')(related_name='transcriptions', to=orm['backend.Gloss'])),
            ('variety', self.gf('django.db.models.fields.related.ForeignKey')(related_name='tanscriptions', to=orm['backend.Variety'])),
        ))
        db.send_create_signal(u'backend', ['Transcription'])

        # Adding model 'Comparison'
        db.create_table(u'backend_comparison', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('description', self.gf('django.db.models.fields.TextField')()),
            ('survey', self.gf('django.db.models.fields.related.ForeignKey')(related_name='comparisons', to=orm['backend.Survey'])),
            ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
        ))
        db.send_create_signal(u'backend', ['Comparison'])

        # Adding model 'ComparisonEntry'
        db.create_table(u'backend_comparisonentry', (
            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('aligned_form', self.gf('django.db.models.fields.CharField')(max_length=100)),
            ('exclude', self.gf('django.db.models.fields.BooleanField')()),
            ('comparison', self.gf('django.db.models.fields.related.ForeignKey')(related_name='entries', to=orm['backend.Comparison'])),
            ('transcription', self.gf('django.db.models.fields.related.ForeignKey')(related_name='comparison_entries', to=orm['backend.Transcription'])),
        ))
        db.send_create_signal(u'backend', ['ComparisonEntry'])

    def backwards(self, orm):
        # Deleting model 'Project'
        db.delete_table(u'backend_project')

        # Deleting model 'Dictionary'
        db.delete_table(u'backend_dictionary')

        # Deleting model 'PartOfSpeech'
        db.delete_table(u'backend_partofspeech')

        # Deleting model 'Gloss'
        db.delete_table(u'backend_gloss')

        # Deleting model 'SortOrder'
        db.delete_table(u'backend_sortorder')

        # Deleting model 'SortPosition'
        db.delete_table(u'backend_sortposition')

        # Deleting model 'Survey'
        db.delete_table(u'backend_survey')

        # Deleting model 'Variety'
        db.delete_table(u'backend_variety')

        # Deleting model 'Transcription'
        db.delete_table(u'backend_transcription')

        # Deleting model 'Comparison'
        db.delete_table(u'backend_comparison')

        # Deleting model 'ComparisonEntry'
        db.delete_table(u'backend_comparisonentry')

    models = {
        u'backend.comparison': {
            'Meta': {'object_name': 'Comparison'},
            'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'description': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'survey': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comparisons'", 'to': u"orm['backend.Survey']"})
        },
        u'backend.comparisonentry': {
            'Meta': {'object_name': 'ComparisonEntry'},
            'aligned_form': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'comparison': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entries'", 'to': u"orm['backend.Comparison']"}),
            'exclude': ('django.db.models.fields.BooleanField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'transcription': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comparison_entries'", 'to': u"orm['backend.Transcription']"})
        },
        u'backend.dictionary': {
            'Meta': {'object_name': 'Dictionary'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'project': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dictionaries'", 'to': u"orm['backend.Project']"})
        },
        u'backend.gloss': {
            'Meta': {'object_name': 'Gloss'},
            'comment_tip': ('django.db.models.fields.TextField', [], {}),
            'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
            'dictionary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'glosses'", 'to': u"orm['backend.Dictionary']"}),
            'field_tip': ('django.db.models.fields.TextField', [], {}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'pos': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['backend.PartOfSpeech']"}),
            'primary': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
            'secondary': ('django.db.models.fields.CharField', [], {'max_length': '50'})
        },
        u'backend.partofspeech': {
            'Meta': {'object_name': 'PartOfSpeech'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '40'})
        },
        u'backend.project': {
            'Meta': {'object_name': 'Project'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'backend.sortorder': {
            'Meta': {'object_name': 'SortOrder'},
            'dictionary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sort_orders'", 'to': u"orm['backend.Dictionary']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
        },
        u'backend.sortposition': {
            'Meta': {'object_name': 'SortPosition'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'sort': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'positions'", 'to': u"orm['backend.SortOrder']"})
        },
        u'backend.survey': {
            'Meta': {'object_name': 'Survey'},
            'dictionary': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'surveys'", 'to': u"orm['backend.Dictionary']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'title': ('django.db.models.fields.TextField', [], {})
        },
        u'backend.transcription': {
            'Meta': {'object_name': 'Transcription'},
            'gloss': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'transcriptions'", 'to': u"orm['backend.Gloss']"}),
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'ipa': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'variety': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tanscriptions'", 'to': u"orm['backend.Variety']"})
        },
        u'backend.variety': {
            'Meta': {'object_name': 'Variety'},
            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'survey': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'varieties'", 'to': u"orm['backend.Survey']"})
        }
    }

    complete_apps = ['backend']


text:
import typing

from .. import load_table_uri_truncate_parquet

if typing.TYPE_CHECKING:
    import pytest

def test_load_table_uri_truncate_parquet(
    capsys: "pytest.CaptureFixture[str]", random_table_id: str
) -> None:
    load_table_uri_truncate_parquet.load_table_uri_truncate_parquet(random_table_id)
    out, _ = capsys.readouterr()
    assert "Loaded 50 rows." in out

redpajama_set_name: RedPajamaGithub


text:
namespace Perfectial.Presentation.Web.ViewModels
{
    using System.ComponentModel.DataAnnotations;

    using Perfectial.Infrastructure.Identity.Base;
    using Perfectial.Presentation.Web.Resources;

    public class RegisterViewModel : ViewModelBase
    {
        public RegisterViewModel(IIdentityProvider identityProvider)
            : base(identityProvider)
        {
        }

        public override string PageTitle => "Log In";

        [Required]
        [EmailAddress]
        [Display(ResourceType = typeof(Resource), Name = "RegisterViewModelEmail")]
        public string Email { get; set; }

        [Required]
        [StringLength(100, ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "RegisterViewModelPasswordErrorMessage", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(Resource), Name = "RegisterViewModelPassword")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(Resource), Name = "RegisterViewModelConfirmPassword")]
        [Compare("Password", ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "RegisterViewModelConfirmPasswordErrorMessage")]
        public string ConfirmPassword { get; set; }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.gmail.htaihm.instagramviewer"
          xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".InstagramViewerActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity
            android:name=".InstagramVideoActivity"
            android:theme="@style/FullScreenVideoTheme"
            android:configChanges="orientation|screenSize">
        </activity>
    </application>

</manifest>


text:
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/jiffies.h>

/* Here are names of the chip's registers (a.k.a. commands) */
enum ltc4215_cmd {
	LTC4215_CONTROL			= 0x00, /* rw */
	LTC4215_ALERT			= 0x01, /* rw */
	LTC4215_STATUS			= 0x02, /* ro */
	LTC4215_FAULT			= 0x03, /* rw */
	LTC4215_SENSE			= 0x04, /* rw */
	LTC4215_SOURCE			= 0x05, /* rw */
	LTC4215_ADIN			= 0x06, /* rw */
};

struct ltc4215_data {
	struct i2c_client *client;

	struct mutex update_lock;
	bool valid;
	unsigned long last_updated; /* in jiffies */

	/* Registers */
	u8 regs[7];
};

static struct ltc4215_data *ltc4215_update_device(struct device *dev)
{
	struct ltc4215_data *data = dev_get_drvdata(dev);
	struct i2c_client *client = data->client;
	s32 val;
	int i;

	mutex_lock(&data->update_lock);

	/* The chip's A/D updates 10 times per second */
	if (time_after(jiffies, data->last_updated + HZ / 10) || !data->valid) {

		dev_dbg(&client->dev, "Starting ltc4215 update\n");

		/* Read all registers */
		for (i = 0; i < ARRAY_SIZE(data->regs); i++) {
			val = i2c_smbus_read_byte_data(client, i);
			if (unlikely(val < 0))
				data->regs[i] = 0;
			else
				data->regs[i] = val;
		}

		data->last_updated = jiffies;
		data->valid = 1;
	}

	mutex_unlock(&data->update_lock);

	return data;
}

/* Return the voltage from the given register in millivolts */
static int ltc4215_get_voltage(struct device *dev, u8 reg)
{
	struct ltc4215_data *data = ltc4215_update_device(dev);
	const u8 regval = data->regs[reg];
	u32 voltage = 0;

	switch (reg) {
	case LTC4215_SENSE:
		/* 151 uV per increment */
		voltage = regval * 151 / 1000;
		break;
	case LTC4215_SOURCE:
		/* 60.5 mV per increment */
		voltage = regval * 605 / 10;
		break;
	case LTC4215_ADIN:
		/*
		 * The ADIN input is divided by 12.5, and has 4.82 mV
		 * per increment, so we have the additional multiply
		 */
		voltage = regval * 482 * 125 / 1000;
		break;
	default:
		/* If we get here, the developer messed up */
		WARN_ON_ONCE(1);
		break;
	}

	return voltage;
}

/* Return the current from the sense resistor in mA */
static unsigned int ltc4215_get_current(struct device *dev)
{
	struct ltc4215_data *data = ltc4215_update_device(dev);

	/*
	 * The strange looking conversions that follow are fixed-point
	 * math, since we cannot do floating point in the kernel.
	 *
	 * Step 1: convert sense register to microVolts
	 * Step 2: convert voltage to milliAmperes
	 *
	 * If you play around with the V=IR equation, you come up with
	 * the following: X uV / Y mOhm == Z mA
	 *
	 * With the resistors that are fractions of a milliOhm, we multiply
	 * the voltage and resistance by 10, to shift the decimal point.
	 * Now we can use the normal division operator again.
	 */

	/* Calculate voltage in microVolts (151 uV per increment) */
	const unsigned int voltage = data->regs[LTC4215_SENSE] * 151;

	/* Calculate current in milliAmperes (4 milliOhm sense resistor) */
	const unsigned int curr = voltage / 4;

	return curr;
}

static ssize_t ltc4215_show_voltage(struct device *dev,
				    struct device_attribute *da,
				    char *buf)
{
	struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
	const int voltage = ltc4215_get_voltage(dev, attr->index);

	return snprintf(buf, PAGE_SIZE, "%d\n", voltage);
}

static ssize_t ltc4215_show_current(struct device *dev,
				    struct device_attribute *da,
				    char *buf)
{
	const unsigned int curr = ltc4215_get_current(dev);

	return snprintf(buf, PAGE_SIZE, "%u\n", curr);
}

static ssize_t ltc4215_show_power(struct device *dev,
				  struct device_attribute *da,
				  char *buf)
{
	const unsigned int curr = ltc4215_get_current(dev);
	const int output_voltage = ltc4215_get_voltage(dev, LTC4215_ADIN);

	/* current in mA * voltage in mV == power in uW */
	const unsigned int power = abs(output_voltage * curr);

	return snprintf(buf, PAGE_SIZE, "%u\n", power);
}

static ssize_t ltc4215_show_alarm(struct device *dev,
					  struct device_attribute *da,
					  char *buf)
{
	struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
	struct ltc4215_data *data = ltc4215_update_device(dev);
	const u8 reg = data->regs[LTC4215_STATUS];
	const u32 mask = attr->index;

	return snprintf(buf, PAGE_SIZE, "%u\n", !!(reg & mask));
}

/*
 * These macros are used below in constructing device attribute objects
 * for use with sysfs_create_group() to make a sysfs device file
 * for each register.
 */

/* Construct a sensor_device_attribute structure for each register */

/* Current */
static SENSOR_DEVICE_ATTR(curr1_input, S_IRUGO, ltc4215_show_current, NULL, 0);
static SENSOR_DEVICE_ATTR(curr1_max_alarm, S_IRUGO, ltc4215_show_alarm, NULL,
			  1 << 2);

/* Power (virtual) */
static SENSOR_DEVICE_ATTR(power1_input, S_IRUGO, ltc4215_show_power, NULL, 0);

/* Input Voltage */
static SENSOR_DEVICE_ATTR(in1_input, S_IRUGO, ltc4215_show_voltage, NULL,
			  LTC4215_ADIN);
static SENSOR_DEVICE_ATTR(in1_max_alarm, S_IRUGO, ltc4215_show_alarm, NULL,
			  1 << 0);
static SENSOR_DEVICE_ATTR(in1_min_alarm, S_IRUGO, ltc4215_show_alarm, NULL,
			  1 << 1);

/* Output Voltage */
static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, ltc4215_show_voltage, NULL,
			  LTC4215_SOURCE);
static SENSOR_DEVICE_ATTR(in2_min_alarm, S_IRUGO, ltc4215_show_alarm, NULL,
			  1 << 3);

/*
 * Finally, construct an array of pointers to members of the above objects,
 * as required for sysfs_create_group()
 */
static struct attribute *ltc4215_attrs[] = {
	&sensor_dev_attr_curr1_input.dev_attr.attr,
	&sensor_dev_attr_curr1_max_alarm.dev_attr.attr,

	&sensor_dev_attr_power1_input.dev_attr.attr,

	&sensor_dev_attr_in1_input.dev_attr.attr,
	&sensor_dev_attr_in1_max_alarm.dev_attr.attr,
	&sensor_dev_attr_in1_min_alarm.dev_attr.attr,

	&sensor_dev_attr_in2_input.dev_attr.attr,
	&sensor_dev_attr_in2_min_alarm.dev_attr.attr,

	NULL,
};
ATTRIBUTE_GROUPS(ltc4215);

static int ltc4215_probe(struct i2c_client *client,
			 const struct i2c_device_id *id)
{
	struct i2c_adapter *adapter = client->adapter;
	struct device *dev = &client->dev;
	struct ltc4215_data *data;
	struct device *hwmon_dev;

	if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
		return -ENODEV;

	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
	if (!data)
		return -ENOMEM;

	data->client = client;
	mutex_init(&data->update_lock);

	/* Initialize the LTC4215 chip */
	i2c_smbus_write_byte_data(client, LTC4215_FAULT, 0x00);

	hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name,
							   data,
							   ltc4215_groups);
	return PTR_ERR_OR_ZERO(hwmon_dev);
}

static const struct i2c_device_id ltc4215_id[] = {
	{ "ltc4215", 0 },
	{ }
};
MODULE_DEVICE_TABLE(i2c, ltc4215_id);

/* This is the driver that will be inserted */
static struct i2c_driver ltc4215_driver = {
	.driver = {
		.name	= "ltc4215",
	},
	.probe		= ltc4215_probe,
	.id_table	= ltc4215_id,
};

module_i2c_driver(ltc4215_driver);

MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("LTC4215 driver");
MODULE_LICENSE("GPL");


text:
using NUnit.Framework;
using QbSync.QbXml.Objects;
using QbSync.QbXml.Tests.Helpers;
using System;
using System.Xml;

namespace QbSync.QbXml.Tests.Types
{
    [TestFixture]
    public class GuidTypeTests
    {
        [Test]
        public void GuidToStringWillBeZeroIfConstructedFromZero()
        {
            /*
             * From Intuit's documentation:
             * A GUIDTYPE value can be zero (0), or it can take the form {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} where X is a hexadecimal digit. For example: {6B063959-81B0-4622-85D6-F548C8CCB517}
             *
             * Zero requires special handling
             */

            var guid = new GUIDTYPE("0");
            Assert.AreEqual("0", guid.ToString());
        }

        [Test]
        public void GuidToStringWillBeHexadecimalWhenConstructedFromEmptyGuid()
        {
            //Retain hex formatting if constructed from a GUID, to align with previous behavior of this type as much as possible

            var guid = new GUIDTYPE(Guid.Empty);
            Assert.AreEqual("{00000000-0000-0000-0000-000000000000}", guid.ToString());
        }

        [Test]
        public void GuidToStringWillBeHexadecimalWhenConstructedFromHexadecimal()
        {
            //Retain hex formatting if parsed from hex format, to align with previous behavior of this type as much as possible

            var guid = new GUIDTYPE("{00000000-0000-0000-0000-000000000000}");
            Assert.AreEqual("{00000000-0000-0000-0000-000000000000}", guid.ToString());
        }

        [Test]
        public void GuidToStringWillBeZeroInQbXmlResponseWhenParsedFromZero()
        {
            //Deserializing from XML will instantiate the GUIDTYPE with its parameterless constructor, Then use ReadXML to set the value
            //Ensure that reading from XML will also handle the Zero (0) format

            var ret = "<DataExtRet><OwnerID>0</OwnerID><DataExtName>name</DataExtName><DataExtType>STR255TYPE</DataExtType><DataExtValue>value</DataExtValue></DataExtRet>";

            var response = new QbXmlResponse();
            var rs = response.GetSingleItemFromResponse<DataExtAddRsType>(QuickBooksTestHelper.CreateQbXmlWithEnvelope(ret, "DataExtAddRs"));
            var dataExt = rs.DataExtRet;

            Assert.AreEqual("0", dataExt.OwnerID.ToString());
        }

        [Test]
        public void GuidToStringWillBeHexadecimalInQbXmlResponseWhenParsedFromHexadecimalEmptyGuid()
        {
            //Deserializing from XML will instantiate the GUIDTYPE with its parameterless constructor, Then use ReadXML to set the value
            //Retain hex formatting when input is also in hex format

            var ret = "<DataExtRet><OwnerID>{00000000-0000-0000-0000-000000000000}</OwnerID><DataExtName>name</DataExtName><DataExtType>STR255TYPE</DataExtType><DataExtValue>value</DataExtValue></DataExtRet>";

            var response = new QbXmlResponse();
            var rs = response.GetSingleItemFromResponse<DataExtAddRsType>(QuickBooksTestHelper.CreateQbXmlWithEnvelope(ret, "DataExtAddRs"));
            var dataExt = rs.DataExtRet;

            Assert.AreEqual("{00000000-0000-0000-0000-000000000000}", dataExt.OwnerID.ToString());
        }

        [Test]
        public void GuidWillOutputZeroInQbXmlRequestWhenConstructedFromZero()
        {
            var request = new QbXmlRequest();
            var innerRequest = new InvoiceQueryRqType
            {
                OwnerID = new[] { new GUIDTYPE("0") }
            };
            request.AddToSingle(innerRequest);
            var xml = request.GetRequest();

            XmlDocument requestXmlDoc = new XmlDocument();
            requestXmlDoc.LoadXml(xml);

            Assert.AreEqual("0", requestXmlDoc.GetElementsByTagName("OwnerID").Item(0).InnerText);
        }

        [Test]
        public void GuidWillOutputHexadecimalInQbXmlRequestWhenConstructedFromEmptyGuid()
        {
            var request = new QbXmlRequest();
            var innerRequest = new InvoiceQueryRqType
            {
                OwnerID = new[] { new GUIDTYPE(Guid.Empty) }
            };
            request.AddToSingle(innerRequest);
            var xml = request.GetRequest();

            XmlDocument requestXmlDoc = new XmlDocument();
            requestXmlDoc.LoadXml(xml);

            Assert.AreEqual("{00000000-0000-0000-0000-000000000000}", requestXmlDoc.GetElementsByTagName("OwnerID").Item(0).InnerText);
        }

        [Test]
        public void GuidWillOutputHexadecimalInQbXmlRequestWhenConstructedFromHexadecimal()
        {
            var request = new QbXmlRequest();
            var innerRequest = new InvoiceQueryRqType
            {
                OwnerID = new[] { new GUIDTYPE("{00000000-0000-0000-0000-000000000000}") }
            };
            request.AddToSingle(innerRequest);
            var xml = request.GetRequest();

            XmlDocument requestXmlDoc = new XmlDocument();
            requestXmlDoc.LoadXml(xml);

            Assert.AreEqual("{00000000-0000-0000-0000-000000000000}", requestXmlDoc.GetElementsByTagName("OwnerID").Item(0).InnerText);
        }
    }
}


text:
package Venn::CLI::LocalBuild;

=head1 DESCRIPTION

Firm-specific local build routines

=head1 AUTHOR

Venn Engineering

Josh Arenberg, Norbert Csongradi, Ryan Kupfer, Hai-Long Nguyen

=head1 LICENSE

Copyright 2013,2014,2015 Morgan Stanley

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

=cut

use MSDW::Version;
use IO::Dir;

1;