text:
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Testing;
using Test.Utilities;
using Xunit;
using VerifyCS = Test.Utilities.CSharpCodeFixVerifier<
    Microsoft.CodeQuality.Analyzers.Maintainability.AvoidUnusedPrivateFieldsAnalyzer,
    Microsoft.CodeQuality.Analyzers.Maintainability.AvoidUnusedPrivateFieldsFixer>;
using VerifyVB = Test.Utilities.VisualBasicCodeFixVerifier<
    Microsoft.CodeQuality.Analyzers.Maintainability.AvoidUnusedPrivateFieldsAnalyzer,
    Microsoft.CodeQuality.Analyzers.Maintainability.AvoidUnusedPrivateFieldsFixer>;

namespace Microsoft.CodeQuality.Analyzers.Maintainability.UnitTests
{
    public class AvoidUnusedPrivateFieldsTests
    {
        private const string CSharpMEFAttributesDefinition = @"
namespace System.ComponentModel.Composition
{
    public class ExportAttribute: System.Attribute
    {
    }
}

namespace System.Composition
{
    public class ExportAttribute: System.Attribute
    {
    }
}
";
        private const string BasicMEFAttributesDefinition = @"
Namespace System.ComponentModel.Composition
    Public Class ExportAttribute
        Inherits System.Attribute
    End Class
End Namespace

Namespace System.Composition
    Public Class ExportAttribute
        Inherits System.Attribute
    End Class
End Namespace
";

        [Fact]
        public async Task CA1823_CSharp_AttributeUsage_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[System.Obsolete(Message)]
public class Class
{
    private const string Message = ""Test"";
}
");
        }

        [Fact]
        public async Task CA1823_CSharp_InterpolatedStringUsage_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
public class Class
{
    private const string Message = ""Test"";
    public string PublicMessage = $""Test: {Message}"";
}
");
        }

        [Fact]
        public async Task CA1823_CSharp_CollectionInitializerUsage_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
using System.Collections.Generic;

public class Class
{
    private const string Message = ""Test"";
    public List<string> PublicMessage = new List<string> { Message };
}
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_CSharp_FieldOffsetAttribute_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)]
public class Class
{
    [System.Runtime.InteropServices.FieldOffsetAttribute(8)]
    private int fieldWithFieldOffsetAttribute;
}
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_CSharp_FieldOffsetAttributeError_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)]
public class Class
{
    [{|CS7036:System.Runtime.InteropServices.FieldOffsetAttribute|}]
    private int {|CS0625:fieldWithFieldOffsetAttribute|};
}
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_CSharp_StructLayoutAttribute_LayoutKindSequential_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
class Class1
{
    private int field;
}

// System.Runtime.InteropServices.LayoutKind.Sequential has value 0
[System.Runtime.InteropServices.StructLayout((short)0)]
class Class2
{
    private int field;
}
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_CSharp_StructLayoutAttribute_LayoutKindAuto_DiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Auto)]
class Class
{
    private int field;
}
",
                GetCA1823CSharpResultAt(5, 17, "field"));
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_CSharp_StructLayoutAttribute_LayoutKindExplicit_DiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)]
class Class
{
    private int {|CS0625:field|};
}
",
                GetCA1823CSharpResultAt(5, 17, "field"));
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_CSharp_StructLayoutAttributeError_NoLayoutKind_DiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
[{|CS1729:System.Runtime.InteropServices.StructLayout|}]
class Class1
{
    private int field;
}

[System.Runtime.InteropServices.StructLayout(1000)]
class Class2
{
    private int field;
}
",
                GetCA1823CSharpResultAt(5, 17, "field"),
                GetCA1823CSharpResultAt(11, 17, "field"));
        }

        [Fact, WorkItem(1217, "https://github.com/dotnet/roslyn-analyzers/issues/1217")]
        public async Task CA1823_CSharp_MEFAttributes_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(CSharpMEFAttributesDefinition + @"
public class Class
{
    [System.Composition.ExportAttribute]
    private int fieldWithMefV1ExportAttribute;

    [System.ComponentModel.Composition.ExportAttribute]
    private int fieldWithMefV2ExportAttribute;
}
");
        }

        [Fact, WorkItem(1217, "https://github.com/dotnet/roslyn-analyzers/issues/1217")]
        public async Task CA1823_CSharp_MEFAttributesError_NoDiagnosticAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(CSharpMEFAttributesDefinition + @"
public class Class
{
    [{|CS1729:System.Composition.ExportAttribute(0)|}]
    private int fieldWithMefV1ExportAttribute;

    [{|CS1729:System.ComponentModel.Composition.ExportAttribute(0)|}]
    private int fieldWithMefV2ExportAttribute;
}
");
        }

        [Fact, WorkItem(1217, "https://github.com/dotnet/roslyn-analyzers/issues/1217")]
        public async Task CA1823_CSharp_MEFAttributesUndefined_DiagnosticAsync()
        {
            await new VerifyCS.Test
            {
                ReferenceAssemblies = ReferenceAssemblies.Default,
                TestCode = @"
public class Class
{
    [System.{|CS0234:Composition|}.ExportAttribute]
    private int fieldWithMefV1ExportAttribute;

    [System.ComponentModel.{|CS0234:Composition|}.ExportAttribute]
    private int fieldWithMefV2ExportAttribute;
}
",
                ExpectedDiagnostics =
                {
                    GetCA1823CSharpResultAt(5, 17, "fieldWithMefV1ExportAttribute"),
                    GetCA1823CSharpResultAt(8, 17, "fieldWithMefV2ExportAttribute"),
                },
            }.RunAsync();
        }

        [Fact]
        public async Task CA1823_CSharp_SimpleUsages_DiagnosticCasesAsync()
        {
            await VerifyCS.VerifyAnalyzerAsync(@"
public class Class
{
    private string fileName = ""data.txt"";
    private int Used1 = 10;
    private int Used2;
    private int Unused1 = 20;
    private int Unused2;
    public int Unused3;

    public string FileName()
    {
        return fileName;
    }

    private int Value => Used1 + Used2;
}
",
                GetCA1823CSharpResultAt(7, 17, "Unused1"),
                GetCA1823CSharpResultAt(8, 17, "Unused2"));
        }

        [Fact]
        public async Task CA1823_VisualBasic_DiagnosticCasesAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
Public Class Class1
    Private fileName As String
    Private Used1 As Integer = 10
    Private Used2 As Integer
    Private Unused1 As Integer = 20
    Private Unused2 As Integer
    Public Unused3 As Integer

    Public Function MyFileName() As String
        Return filename
    End Function

    Public ReadOnly Property MyValue As Integer
        Get
            Return Used1 + Used2
        End Get
    End Property
End Class
",
                GetCA1823BasicResultAt(6, 13, "Unused1"),
                GetCA1823BasicResultAt(7, 13, "Unused2"));
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_VisualBasic_FieldOffsetAttribute_NoDiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)> _
Public Class [Class]
    <System.Runtime.InteropServices.FieldOffsetAttribute(8)> _
    Private fieldWithFieldOffsetAttribute As Integer
End Class
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_VisualBasic_FieldOffsetAttributeError_NoDiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)>
Public Class [Class]
    <System.Runtime.InteropServices.{|BC30455:FieldOffsetAttribute|}>
    Private fieldWithFieldOffsetAttribute As Integer
End Class
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_VisualBasic_StructLayoutAttribute_LayoutKindSequential_NoDiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)> _
Public Class Class1
    Private field As Integer
End Class

' System.Runtime.InteropServices.LayoutKind.Sequential has value 0
<System.Runtime.InteropServices.StructLayout(0)> _
Public Class Class2
    Private field As Integer
End Class
");
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_VisualBasic_StructLayoutAttribute_LayoutKindAuto_DiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Auto)> _
Public Class [Class]
    Private field As Integer
End Class
",
                GetCA1823BasicResultAt(4, 13, "field"));
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_VisualBasic_StructLayoutAttribute_LayoutKindExplicit_DiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
<System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Explicit)> _
Public Class [Class]
    Private field As Integer
End Class
",
                GetCA1823BasicResultAt(4, 13, "field"));
        }

        [Fact, WorkItem(1219, "https://github.com/dotnet/roslyn-analyzers/issues/1219")]
        public async Task CA1823_VisualBasic_StructLayoutAttributeError_NoLayoutKind_DiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(@"
<System.Runtime.InteropServices.{|BC30516:StructLayout|}> _
Public Class Class1
    Private field As Integer
End Class

<System.Runtime.InteropServices.{|BC30519:StructLayout|}(1000)> _
Public Class Class2
    Private field As Integer
End Class
",
                GetCA1823BasicResultAt(4, 13, "field"),
                GetCA1823BasicResultAt(9, 13, "field"));
        }

        [Fact, WorkItem(1217, "https://github.com/dotnet/roslyn-analyzers/issues/1217")]
        public async Task CA1823_VisualBasic_MEFAttributes_NoDiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(BasicMEFAttributesDefinition + @"
Public Class [Class]
    <System.Composition.ExportAttribute> _
    Private fieldWithMefV1ExportAttribute As Integer

    <System.ComponentModel.Composition.ExportAttribute> _
    Private fieldWithMefV2ExportAttribute As Integer
End Class
");
        }

        [Fact, WorkItem(1217, "https://github.com/dotnet/roslyn-analyzers/issues/1217")]
        public async Task CA1823_VisualBasic_MEFAttributesError_NoDiagnosticAsync()
        {
            await VerifyVB.VerifyAnalyzerAsync(BasicMEFAttributesDefinition + @"
Public Class [Class]
    <System.Composition.ExportAttribute({|BC30057:0|})> _
    Private fieldWithMefV1ExportAttribute As Integer

    <System.ComponentModel.Composition.ExportAttribute({|BC30057:0|})> _
    Private fieldWithMefV2ExportAttribute As Integer
End Class
");
        }

        [Fact, WorkItem(1217, "https://github.com/dotnet/roslyn-analyzers/issues/1217")]
        public async Task CA1823_VisualBasic_MEFAttributesUndefined_DiagnosticAsync()
        {
            await new VerifyVB.Test
            {
                ReferenceAssemblies = ReferenceAssemblies.Default,
                TestCode = @"
Public Class [Class]
    <{|BC30002:System.Composition.ExportAttribute|}> _
    Private fieldWithMefV1ExportAttribute As Integer

    <{|BC30002:System.ComponentModel.Composition.ExportAttribute|}> _
    Private fieldWithMefV2ExportAttribute As Integer
End Class
",
                ExpectedDiagnostics =
                {
                    GetCA1823BasicResultAt(4, 13, "fieldWithMefV1ExportAttribute"),
                    GetCA1823BasicResultAt(7, 13, "fieldWithMefV2ExportAttribute"),
                },
            }.RunAsync();
        }

        private static DiagnosticResult GetCA1823CSharpResultAt(int line, int column, string fieldName)
#pragma warning disable RS0030 // Do not used banned APIs
            => VerifyCS.Diagnostic()
                .WithLocation(line, column)
#pragma warning restore RS0030 // Do not used banned APIs
                .WithArguments(fieldName);

        private static DiagnosticResult GetCA1823BasicResultAt(int line, int column, string fieldName)
#pragma warning disable RS0030 // Do not used banned APIs
            => VerifyVB.Diagnostic()
                .WithLocation(line, column)
#pragma warning restore RS0030 // Do not used banned APIs
                .WithArguments(fieldName);
    }
}


text:
// Admin Config View -- config vote and comment permission
// -------------------------------------------------------

(function ($, _, Backbone) {

  "use strict";
  <% var namespace = _.camelize(appname).toLowerCase(); %>
  /*
   * View for modificaiton of a board's information.
   */
  <%= namespace %>.views.ConfigView = Backbone.View.extend({
    el: "div.config-window",
    template: jade.compile($("#template-admin-config-view").text()),

    events: {
      'hidden.bs.modal': 'closeConfigView'
    },

    render: function() {
      this.$el.html(this.template(this.model.toJSON()));
      this.voteConfig = new <%= namespace %>.views.VoteConfig({
        model: this.model
      });
      this.voteConfig.render();

      this.commentConfig = new <%= namespace %>.views.CommentConfig({
        model: this.model
      });
      this.commentConfig.render();

      return this;
    },

    modal: function() {
      this.$el.modal();
    },

    show: function() {
      this.render().modal();
    },

    closeConfigView: function() {
      this.voteConfig.close();
      this.commentConfig.close();

      // clear configView
      this.$el.empty();
      this.undelegateEvents();
      this.stopListening();
    }
  });

  <%= namespace %>.views.VoteConfig = Backbone.View.extend({
    el: "dl.js-vote",
    template: jade.compile($("#template-vote-config-view").text()),

    events: {
      'click .js-disable-vote span:last': 'onDisableVoteClick',
      'click .js-enable-vote span:last': 'onEnableVoteClick',
      'click .js-open-vote span:last': 'onOpenVoteClick'
    },

    initialize: function() {
      this.model.on('change:voteStatus', this.render, this);
    },

    render: function() {
      this.$el.html(this.template(this.model.toJSON()));
      var voteStatus = this.model.toJSON().voteStatus;
      var checkedVoteElement;

      if (voteStatus === 'opened') {
        checkedVoteElement = $('.js-open-vote')[0];
      } else if (voteStatus === 'enabled') {
        checkedVoteElement = $('.js-enable-vote')[0];
      } else {
        checkedVoteElement = $('.js-disable-vote')[0];
      }

      this.selectCheckedVoteStatus(checkedVoteElement);

      return this;
    },

    close: function() {
      this.remove();
    },

    selectCheckedVoteStatus: function(checkedVoteElement) {
      var voteOptions = this.$el.find('dl.js-vote a');
      var clickIndex = voteOptions.index($(checkedVoteElement));
      var checkedIndex = voteOptions.index(voteOptions.filter('.checked'));

      if (clickIndex > checkedIndex) {
        voteOptions.slice(0, clickIndex).removeClass('via')
          .children().removeClass('via');
      }

      voteOptions.removeClass('checked')
        .children().removeClass('checked');

      $(checkedVoteElement).addClass("via checked")
        .nextAll().addClass("via")
        .end().children("span:first").addClass("via")
        .end().children("span:eq(1)").addClass("checked");
    },

    onDisableVoteClick: function(event) {
      this.changeVoteStatus(event.target.parentNode, 'disabled');
    },

    onEnableVoteClick: function(event) {
      this.changeVoteStatus(event.target.parentNode, 'enabled');
    },

    onOpenVoteClick: function(event) {
      this.changeVoteStatus(event.target.parentNode, 'opened');
    },

    changeVoteStatus: function(sender, status) {
      if ($(sender).hasClass('checked')) {
        return;
      }

      var origin_voteStatus = this.model.get('voteStatus');
      this.model.set('voteStatus', status);
      this.model.patch({
        voteStatus: status,
        original: {voteStatus: origin_voteStatus}
      });

      this.selectCheckedVoteStatus(sender);
    }

  });

  <%= namespace %>.views.CommentConfig = Backbone.View.extend({
    el: "dl.js-comment",
    template: jade.compile($("#template-comment-config-view").text()),

    events: {
      'click .js-disable-comment span:last': 'onDisableCommentClick',
      'click .js-enable-comment span:last': 'onEnableCommentClick',
      'click .js-open-comment span:last': 'onOpenCommentClick'
    },

    initialize: function() {
      this.model.on('change:commentStatus', this.render, this);
    },

    render: function() {
      this.$el.html(this.template(this.model.toJSON()));
      var commentStatus = this.model.toJSON().commentStatus;
      var checkedCommentElement;

      if (commentStatus === 'opened') {
        checkedCommentElement = $('.js-open-comment')[0];
      } else if (commentStatus === 'enabled') {
        checkedCommentElement = $('.js-enable-comment')[0];
      } else {
        checkedCommentElement = $('.js-disable-comment')[0];
      }

      this.selectCheckedCommentStatus(checkedCommentElement);

      return this;
    },

    close: function() {
      this.remove();
    },

    selectCheckedCommentStatus: function(checkedCommentElement) {
      var commentOptions = this.$el.find('dl.js-comment a');
      var clickIndex = commentOptions.index($(checkedCommentElement));
      var checkedIndex = commentOptions.index(commentOptions.filter('.checked'));

      if (clickIndex > checkedIndex) {
        commentOptions.slice(0, clickIndex).removeClass('via')
          .children().removeClass('via');
      }

      commentOptions.removeClass('checked')
        .children().removeClass('checked');

      $(checkedCommentElement).addClass("via checked")
        .nextAll().addClass("via")
        .end().children("span:first").addClass("via")
        .end().children("span:eq(1)").addClass("checked");
    },

    onDisableCommentClick: function(event) {
      this.changeCommentStatus(event.target.parentNode, 'disabled');
    },

    onEnableCommentClick: function(event) {
      this.changeCommentStatus(event.target.parentNode, 'enabled');
    },

    onOpenCommentClick: function(event) {
      this.changeCommentStatus(event.target.parentNode, 'opened');
    },

    changeCommentStatus: function(sender, status) {
      if ($(sender).hasClass('checked')) {
        return;
      }

      var origin_commentStatus = this.model.get('commentStatus');
      this.model.set('commentStatus', status);
      this.model.patch({
        commentStatus: status,
        original: {commentStatus: origin_commentStatus}
      });

      this.selectCheckedCommentStatus(sender);
    }
  });

}(jQuery, _, Backbone));

redpajama_set_name: RedPajamaGithub


text:
{{ title }}

				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-pills-collapse">
					Toggle navigation

				</button>

Joey

Jason

Paulette

Derice

Pete

Shanice

Will

Brent

Paulo

Joe Bloggs, Lead Guitarist

Hey fans! I'm Joe Bloggs, but you can call me Joey. I play lead guitar in the group. We want to thank you all for being our loyal fans and helping us on our journey to stardom, we sincerely mean that! Without you all we would not be here where we are today. Rock on!

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Jason De Santos, Saxophone

Always a pleasure people! Hope you enjoyed it as much as I did. Could I BE.. any more pleased?

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Paulette Wall, Jazz Singer

I mean, sometimes I enjoy the show, but other times I enjoy other things.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Derice Del Torro, Guitarist

Hey fans! I'm Derice Del Torro, but you can call me Joey. I play lead guitar in the group. We want to thank you all for being our loyal fans and helping us on our journey to stardom, we sincerely mean that! Without you all we would not be here where we are today. Rock on!

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Pete Bridges, Violin

Always a pleasure people! Hope you enjoyed it as much as I did. Could I BE.. any more pleased?

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Shanice Rose, Guitarist & Singer

I mean, sometimes I enjoy the show, but other times I enjoy other things.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

William Johnson, Bongo Drums

I mean, sometimes I enjoy the show, but other times I enjoy other things.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Brent Taylor, Banjo Player

I mean, sometimes I enjoy the show, but other times I enjoy other things.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Paulo Benerd, Acoustic Guitarist

I mean, sometimes I enjoy the show, but other times I enjoy other things.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

Bresaola frankfurter ham shoulder, turducken pig ribs tri-tip, ham jerky ham beef, pig pork andouille frankfurter. Tip jerky ham corned, kevin tip shankle. Cow tip corned andouille. Cow tip flank prosciutto. Hock sopressata kielbasa jowl shoulder ham chicken pig prosciutto, cow tail bierschinken, pork sausage frankfurter cow ham ground turducken bresaola cow pig ham boudin ground ribs tip tri-tip salami flank porchetta tail cow tip beef prosciutto. Pig ribs pancetta, turkey andouille sopressata.

{{ playlistTitle }}

				<audio controls="controls" autoplay preload="auto">

You're browser does not support the suio element.

				</audio>

				<button id="next-button" class="btn-lg btn-warning">Next</button>

{{ albumart }}

{{ track }}

{{ duration }}

							Last Train To Clarksville

							2:46

							Daydream Believer

							2:43

							I'm a Believer

							2:35

							I'm Not Your Stepping Stone

							2:22

							Tail Toddle

							1:27


text:
function model = build_recursive_scheme(model);

model.evaluation_scheme = [];
model.deppattern = model.monomtable | model.monomtable;

% Figure out arguments in all polynomials & sigmonials. This info is
% used on several places, so we might just as well save it
model.monomials = find(model.variabletype);
model.monomialMap = cell(length(model.monomials),1);
model.evaluation_scheme = [];
%M = model.monomtable(model.monomials,:);
MM= model.monomtable(model.monomials,:)';
for i = 1:length(model.monomials)
 %   model.monomialMap{i}.variableIndex = find(model.monomtable(model.monomials(i),:));
 %   model.monomialMap{i}.variableIndex = find(M(i,:));
    model.monomialMap{i}.variableIndex = find(MM(:,i));
end

if ~isempty(model.evalMap)

    remainingEvals  = ones(1,length(model.evalVariables));
    remainingMonoms = ones(1,length(model.monomials));
    model = recursive_call(model,remainingEvals,remainingMonoms);

    % Define a dependency structure
    % (used to speed up Jacobian computations etc)
    model.isevalVariable = zeros(1,size(model.monomtable,1));
    model.isevalVariable(model.evalVariables) = 1;
    compute_depenedency = 1:size(model.monomtable,1);
    % remove purely linear variables, dependency is already computed
    compute_depenedency = setdiff(compute_depenedency,setdiff(find(model.variabletype==0),model.evalVariables));
    if isequal(model.evaluation_scheme{1}.group,'monom')
        % This first level of monomials are simply defined by the monomial
        % table, hence dependency is already computed
        compute_depenedency = setdiff(compute_depenedency,model.monomials(model.evaluation_scheme{1}.variables));
    end
    for i = compute_depenedency
        k = depends_on(model,i);
        model.deppattern(i,k) = 1;
    end
else
    % Only monomials
    model.evaluation_scheme{1}.group = 'monom';
    model.evaluation_scheme{1}.variables = 1:nnz(model.variabletype);
end

function r = depends_on(model,k)
if model.variabletype(k)
    vars = find(model.monomtable(k,:));
    r=[];
    for i = 1:length(vars)
        r = [r depends_on(model,vars(i))];
    end
elseif model.isevalVariable(k)%ismember(k,model.evalVariables)
    j = find(k == model.evalVariables);
    r = [];
    for i = 1:length(model.evalMap{j}.variableIndex)
        argument = model.evalMap{j}.variableIndex(i);
        r = [r argument depends_on(model,argument)];
    end
else
    r = k;
end

function model = recursive_call(model,remainingEvals,remainingMonoms)

if ~any(remainingEvals) & ~any(remainingMonoms)
    return
end

stillE = find(remainingEvals);
stillM = find(remainingMonoms);

% Extract arguments in first layer
if any(remainingEvals)
    for i = 1:length(model.evalMap)
        composite_eval_expression(i) = any(ismembc(model.evalMap{i}.variableIndex,model.evalVariables(stillE)));
        composite_eval_expression(i) = composite_eval_expression(i) | any(ismembc(model.evalMap{i}.variableIndex,model.monomials(stillM)));
    end
end
if any(remainingMonoms)
    if issorted(model.evalVariables(stillE))
        for i = 1:length(model.monomials)
    %    composite_monom_expression(i) = any(ismember(model.monomialMap{i}.variableIndex,model.monomials(stillM)));
    %    composite_monom_expression(i) = composite_monom_expression(i) | any(ismember(model.monomialMap{i}.variableIndex,model.evalVariables(stillE)));
        composite_monom_expression(i) = any(ismembc(model.monomialMap{i}.variableIndex,model.evalVariables(stillE)));
    end
    else
    for i = 1:length(model.monomials)
    %    composite_monom_expression(i) = any(ismember(model.monomialMap{i}.variableIndex,model.monomials(stillM)));
    %    composite_monom_expression(i) = composite_monom_expression(i) | any(ismember(model.monomialMap{i}.variableIndex,model.evalVariables(stillE)));
        composite_monom_expression(i) = any(ismember(model.monomialMap{i}.variableIndex,model.evalVariables(stillE)));
    end
    end
end

% Bottom layer
if ~isempty(model.monomials) & any(remainingMonoms)
    if ~isempty(find(~composite_monom_expression & remainingMonoms))
        model.evaluation_scheme{end+1}.group = 'monom';
        model.evaluation_scheme{end}.variables = find(~composite_monom_expression & remainingMonoms);
    end
    remainingMonoms = composite_monom_expression & remainingMonoms;
end

% Bottom layer
if ~isempty(model.evalMap) & any(remainingEvals)
    if ~isempty(find(~composite_eval_expression & remainingEvals));
        model.evaluation_scheme{end+1}.group = 'eval';
        model.evaluation_scheme{end}.variables = find(~composite_eval_expression & remainingEvals);
    end
    remainingEvals = composite_eval_expression & remainingEvals;
end

model = recursive_call(model,remainingEvals,remainingMonoms);


text:
var playState = {

    create: function(){
        var background = game.add.sprite(0, 0, 'cidade');
        background.width = 1300;
        background.height = 650;

        graphics = game.add.graphics(0, 0);

        groupCidade = game.add.group();

        groupCidade.inputEnableChildren = true;

        var x = 100;

        for (var i = 0; i < 3; i++){
            // Gera os retangulos que ficarão atras das imagens
            graphics.beginFill(0xFFFFFF);
            graphics.lineStyle(3, 0x05005e, 1);
            graphics.drawRoundedRect(x, 200, 315, 190, 10);
            graphics.endFill();

            var button = groupCidade.create(x, 200, graphics.generateTexture());
            button.tint = 0xff8800;
            button.name = 'groupCidade-child-' + i;

            x = x + 400;
        }
        graphics.destroy();

        var cachorro = game.add.sprite(110, 210, 'cachorro');
        cachorro.width = 300;
        cachorro.height = 170;

        // Desenha o gato e a borda da box

        var gato = game.add.sprite(510, 210, 'gato');
        gato.width = 300;
        gato.height = 170;

        // Desenha o passaro e a borda da box

        var passaro = game.add.sprite(910, 210, 'passaro');
        passaro.width = 300;
        passaro.height = 170;

        groupCidade.onChildInputDown.add(onDown, this);
        groupCidade.onChildInputOver.add(onOver, this);
        groupCidade.onChildInputOut.add(onOut, this);

        gato.tint = 0x000000

        function onDown (sprite) {
            sprite.tint = 0x00ff00;
        }

        function onOver (sprite) {
            sprite.tint = 0xffff00;
        }

        function onOut (sprite) {
            sprite.tint = 0xff8800;
            // sprite.tint = Math.random() * 0xffffff;

        }

    },

    update: function(){

    },

    Win: function(){
        game.state.start('win');
    }
};


text:
using System.Reflection;
using System.Runtime.CompilerServices;
using Avalonia.Metadata;

[assembly: AssemblyTitle("Avalonia.Visuals")]
[assembly: InternalsVisibleTo("Avalonia.Visuals.UnitTests")]
[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Animation")]
[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Media")]

[assembly: InternalsVisibleTo("Avalonia.Cairo.RenderTests")]
[assembly: InternalsVisibleTo("Avalonia.Direct2D1.RenderTests")]
[assembly: InternalsVisibleTo("Avalonia.Skia.RenderTests")]


text:
Ext.define('CA.techservices.validator.Validator',{
    alias: 'widget.tsvalidator',

    /**
     *
     * [{rule}] An array of validation rules
     */
    rules: [],

    recordsByModel: {},

    categoryField: 'Project',

    // fields that all rules should fetch
    fetchFields: [],
    /**
     *
     * a hash containing events for a data point e.g.,
     *
     * points will include a field called _records holding the associated records
     * and each record will have a field called __ruleText holding a statement about
     * its violation
     *
     *     {
     *          click: function() {
     *          me.showDrillDown(this._records,this._name);
     *      }
     */
    pointEvents: null,
    /**
     *
     * a hash of filters by model type.  Filter will be ANDed to the filters we get from the validation rules
     * (which are themselves ORed together).
     */
    baseFilters: null,

    constructor: function(config) {
        Ext.apply(this,config);

        //console.log("validator-constructor",this,config,config.rules.length);

        var rules = [];

       // Ext.Array.each(this.rules, function(rule){
            Ext.Array.each(config.rules, function(rule){
            var name = rule.xtype;

            //console.log('validator-constructor-before delete: ', name,rule);

            if ( !Ext.isEmpty(name) ) {
                var new_rule = Ext.clone(rule);
                delete new_rule.xtype;
                // delete rule.xtype; // # confirm
                console.log('Initializing ', name,rule);
                rules.push(Ext.createByAlias('widget.' + name, new_rule));
            }
        });

        this.rules = rules;
    },

    getRuleDescriptions: function() {
        var text = "
";

        Ext.Array.each(this.rules, function(rule){
            var rule_description = rule.getDescription() || "";
            if ( !Ext.isEmpty(rule_description) ) {
                text = text + "
" + rule_description + "
";
            }
        });
        text = text + "
";

        return text;
    },

    getFiltersByModel: function() {
        var me = this,
            filters_by_model = {};

        Ext.Array.each(this.rules, function(rule){
            var model = rule.getModel();
            var filters = rule.getFilters();

            if ( !Ext.isEmpty(model) && !Ext.isEmpty(filters) ) {

                console.log("GetFiltersByModel",filters.toString(),rule.xtype);

                if ( Ext.isEmpty(filters_by_model[model]) ) {
                    filters_by_model[model] = [];
                }
                filters_by_model[model].push(filters);
            }
        });

        Ext.Object.each(filters_by_model, function(model, filters){
            filters = Ext.Array.unique( Ext.Array.flatten(filters) );
            filters_by_model[model] = Rally.data.wsapi.Filter.or(filters);

            if ( me.baseFilters && me.baseFilters != {} && me.baseFilters[model] != {} ) {

                console.log("Flattening the Filter array ",me.baseFilters);

                filters_by_model[model] = filters_by_model[model].and(me.baseFilters[model]);
            }
        });

        return filters_by_model;
    },

    getFetchFieldsByModel: function() {
        var me = this,
            fields_by_model = {};

        Ext.Array.each(this.rules, function(rule){
            var model = rule.getModel();
            var fields = rule.getFetchFields();

            if ( !Ext.isEmpty(model) && !Ext.isEmpty(fields) && fields.length > 0 ) {
                if ( Ext.isEmpty(fields_by_model[model]) ) {
                    fields_by_model[model] = [me.categoryField,'Name'];
                }
                fields_by_model[model].push(fields);
            }
        });

        Ext.Object.each(fields_by_model, function(model, fields){
            fields = Ext.Array.flatten(fields);
            fields = Ext.Array.push(fields, me.fetchFields);

            fields_by_model[model] = Ext.Array.unique(fields);
        });

        return fields_by_model;
    },

    // returns a promise, promise fulfilled by hash of results by model type
    gatherData: function() {

        var deferred = Ext.create('Deft.Deferred'),
            me = this;

        var fetch_by_model = this.getFetchFieldsByModel();
        var filters_by_model = this.getFiltersByModel();

        var promises = [];
        Ext.Object.each(fetch_by_model, function(model, fetch){
            var config = {
                model: model,
                fetch: fetch,
                limit: Infinity,
                filters: filters_by_model[model]
            };

            promise = function() {
                return this._loadWsapiRecords(config);
            };
            promises.push(promise);
        },this);

        Deft.Chain.sequence(promises,this).then({
            success: function(results) {
                me.recordsByModel = {};
                Ext.Array.each(results, function(result) {
                    me.recordsByModel = Ext.apply(me.recordsByModel, result);
                });
                deferred.resolve(results);
            },
            failure: function(msg) {
                deferred.reject(msg);
            }
        });
        return deferred.promise;
    },

    getChartData: function() {
        if ( this.recordsByModel == {} ) {
            console.log('No search results');
            return {};
        }

        var categories = this.getCategories();
        var series = this.getSeries(categories);

        return { series: series, categories: categories };

    },

    getCategories: function() {
        var me = this,
            records = Ext.Array.flatten(Ext.Object.getValues(this.recordsByModel));

        var category_field = this.categoryField;

        var possible_categories = Ext.Array.map(records, function(record) {
            return me.getCategoryFromRecord(record,category_field);
        });

        return Ext.Array.unique(possible_categories);
    },

    getCategoryFromRecord: function(record,category_field) {
        if ( Ext.isEmpty(record.get(category_field)) ) { return ""; }
        if ( Ext.isString(record.get(category_field)) ) { return record.get(category_field); }
        return record.get(category_field)._refObjectName;
    },

    getSeries: function(categories) {
        var me = this,
            category_field = me.categoryField,
            series = [];

        // one series per rule, one stack per model type
        Ext.Array.each(this.rules, function(rule){
            var series_name = rule.getUserFriendlyRuleLabel();
            var model = rule.getModel();
            var records = me.recordsByModel[model];

            var failed_records = me.getFailedRecordsForRule(records, rule);

            var records_by_category = me.getRecordsByCategory(failed_records, categories, category_field);

            var data = [];
            Ext.Array.each(categories, function(category){
                var category_records = records_by_category[category] || [];

                var count = category_records.length;
                var datum = {
                    y: count,
                    _records: category_records,
                    _name: series_name
                };

                if ( !Ext.isEmpty(me.pointEvents) ) {
                    datum.events = me.pointEvents
                }
                data.push(datum);
            });
            series.push({
                name: series_name,

                records: failed_records,
                data: data,
                stack: model
            });
        });

        return series;
    },

    getFailedRecordsForRule: function(records, rule) {
        var failed_records = [];
        Ext.Array.each(records, function(record) {
            var failure = rule.applyRuleToRecord(record);
            if ( failure ) {
                var texts = record.get('__ruleText') || [];
                texts.push(failure);
                record.set('__ruleText', texts);
                failed_records.push(record);
            }
        });

        return failed_records;
    },

    getRecordsByCategory: function(records, categories, category_field) {
        var me = this,
            record_hash = {};

        Ext.Array.each(records, function(record){
            var category = me.getCategoryFromRecord(record,category_field);
            if ( Ext.isEmpty(record_hash[category]) ) {
                record_hash[category] = [];
            }
            record_hash[category].push(record);
        });

        return record_hash;
    },

    getPrecheckResults: function() {
        console.log("GetPreCheckResults",this,this.rules.length,this.rules);
        var promises = Ext.Array.map(this.rules, function(rule){
            return function() {
                return rule.precheckRule();
            };
        });

        if ( promises.length === 0 ) {
            return null;
        }

        return Deft.Chain.sequence(promises);
    },
    _loadWsapiRecords: function(config){
        var deferred = Ext.create('Deft.Deferred');
        var me = this;
        var default_config = {
            compact: false,   // Awesome technique to get project.parent.project.name!!!
            model: 'Defect',
            fetch: ['ObjectID']
        };
        Ext.create('Rally.data.wsapi.Store', Ext.Object.merge(default_config,config)).load({
            callback : function(records, operation, successful) {
                if (successful){
                    var result = {};
                    result[config.model] = records;
                    deferred.resolve(result);
                } else {
                    deferred.reject('Problem loading: ' + operation.error.errors.join('. '));
                }
            }
        });
        return deferred.promise;
    }
});


text:
"""Provides generic JSON views

This modules defines several basic views for serializing
data to JSON.  Submodels that have already been serialized
as JSON may have their string values marked with `__is_json__
= True` using :class:`openstack.common.report.utils.StringWithAttrs`
(each of the classes within this module does this automatically,
and non-naive serializers check for this attribute and handle
such strings specially)
"""

import copy
from openstack.common import jsonutils as json

import openstack.common.report.utils as utils

class BasicKeyValueView(object):
    """A Basic Key-Value JSON View

    This view performs a naive serialization of a model
    into JSON by simply calling :func:`json.dumps` on the model
    """

    def __call__(self, model):
        res = utils.StringWithAttrs(json.dumps(model.data))
        res.__is_json__ = True
        return res

class KeyValueView(object):
    """A Key-Value JSON View

    This view performs advanced serialization to a model
    into JSON.  It does so by first checking all values to
    see if they are marked as JSON.  If so, they are deserialized
    using :func:`json.loads`.  Then, the copy of the model with all
    JSON deserialized is reserialized into proper nested JSON using
    :func:`json.dumps`.
    """

    def __call__(self, model):
        # this part deals with subviews that were already serialized
        cpy = copy.deepcopy(model)
        for key, valstr in model.items():
            if getattr(valstr, '__is_json__', False):
                cpy[key] = json.loads(valstr)

        res = utils.StringWithAttrs(json.dumps(cpy.data))
        res.__is_json__ = True
        return res


text:
<?xml version="1.0" encoding="utf-8"?>

Advanced Currency Column Option

How to configure the optional Advanced Column Options for currency columns for a form or list in the Form and List module. This tutorial assumes you are currently adding or editing a currency column.  See <MadCap:xref href="../Creating a List.html"> "Creating a List"</MadCap:xref>, <MadCap:xref href="../Creating a Form.html"> "Creating a Form"</MadCap:xref> or  <MadCap:xref href="../Editing List or Form Columns.html"> "Editing List or Form Columns"</MadCap:xref>

 Go to the Advanced Column Options section and set any of the following optional fields:

At List of Values set the following:

In the List of Values text box, enter one or more values separated by a semi-colon ( ; ). E.g. 10;10.50;20;20.50;30;30.50 - OR - Leave this field blank to display a text box in which any value can be entered.

Select how the list options are displayed:

Drop Down List: Display values in a drop down selection list. This is useful when there are a lot of values.

Radio Button List (Vertical): Display values in a vertical list with radio buttons.

RBL (Horizontal): Display values in a horizontal list with radio buttons.

In the Currency Symbol text box, enter the currency symbol that you want to display in the Table. E.g. $. Leave this field blank to display the currency as set under Site Settings. E.g. USD.

In the Default Value text box, enter the default currency value for this field. When creating a new row this value will automatically be selected or entered.

In the Validation Rule text box, enter the required input pattern using the "Regular Expression" language. See MSDN Library for more on expressions.

In the Validation Message text box, enter the message to be displayed if the value entered is incorrect for the validation rule.

In the CSS Style text box, enter the Style which is applied on  text box or list control in form. E.g. width:300px

In the Help Text text box, enter a help message to assist users when they add and manage data for this column.

Setting the Advanced Options for a Currency column

Adding a currency record to a list on the Edit Record page

The currency column with the currency symbol set as displayed in a list


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

package com.azure.resourcemanager.machinelearning.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Result of AmlCompute Nodes. */
@Immutable
public final class AmlComputeNodesInformation {
    /*
     * The collection of returned AmlCompute nodes details.
     */
    @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY)
    private List<AmlComputeNodeInformation> nodes;

    /*
     * The continuation token.
     */
    @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
    private String nextLink;

    /** Creates an instance of AmlComputeNodesInformation class. */
    public AmlComputeNodesInformation() {
    }

    /**
     * Get the nodes property: The collection of returned AmlCompute nodes details.
     *
     * @return the nodes value.
     */
    public List<AmlComputeNodeInformation> nodes() {
        return this.nodes;
    }

    /**
     * Get the nextLink property: The continuation token.
     *
     * @return the nextLink value.
     */
    public String nextLink() {
        return this.nextLink;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (nodes() != null) {
            nodes().forEach(e -> e.validate());
        }
    }
}


text:
require "spec_helper"

RSpec.describe(::PaperTrail, versioning: true) do
  CHAPTER_NAMES = [
    "Down the Rabbit-Hole",
    "The Pool of Tears",
    "A Caucus-Race and a Long Tale",
    "The Rabbit Sends in a Little Bill",
    "Advice from a Caterpillar",
    "Pig and Pepper",
    "A Mad Tea-Party",
    "The Queen's Croquet-Ground",
    "The Mock Turtle's Story",
    "The Lobster Quadrille",
    "Who Stole the Tarts?",
    "Alice's Evidence"
  ].freeze

  after do
    Timecop.return
  end

  context "a has_one association" do
    before { @widget = Widget.create(name: "widget_0") }

    context "before the associated was created" do
      before do
        @widget.update_attributes(name: "widget_1")
        @wotsit = @widget.create_wotsit(name: "wotsit_0")
      end

      context "when reified" do
        before { @widget0 = @widget.versions.last.reify(has_one: true) }

        it "see the associated as it was at the time" do
          expect(@widget0.wotsit).to be_nil
        end

        it "not persist changes to the live association" do
          expect(@widget.reload.wotsit).to(eq(@wotsit))
        end
      end
    end

    context "where the association is created between model versions" do
      before do
        @wotsit = @widget.create_wotsit(name: "wotsit_0")
        Timecop.travel(1.second.since)
        @widget.update_attributes(name: "widget_1")
      end

      context "when reified" do
        before { @widget0 = @widget.versions.last.reify(has_one: true) }

        it "see the associated as it was at the time" do
          expect(@widget0.wotsit.name).to(eq("wotsit_0"))
        end

        it "not persist changes to the live association" do
          expect(@widget.reload.wotsit).to(eq(@wotsit))
        end
      end

      context "and then the associated is updated between model versions" do
        before do
          @wotsit.update_attributes(name: "wotsit_1")
          @wotsit.update_attributes(name: "wotsit_2")
          Timecop.travel(1.second.since)
          @widget.update_attributes(name: "widget_2")
          @wotsit.update_attributes(name: "wotsit_3")
        end

        context "when reified" do
          before { @widget1 = @widget.versions.last.reify(has_one: true) }

          it "see the associated as it was at the time" do
            expect(@widget1.wotsit.name).to(eq("wotsit_2"))
          end

          it "not persist changes to the live association" do
            expect(@widget.reload.wotsit.name).to(eq("wotsit_3"))
          end
        end

        context "when reified opting out of has_one reification" do
          before { @widget1 = @widget.versions.last.reify(has_one: false) }

          it "see the associated as it is live" do
            expect(@widget1.wotsit.name).to(eq("wotsit_3"))
          end
        end
      end

      context "and then the associated is destroyed" do
        before { @wotsit.destroy }

        context "when reify" do
          before { @widget1 = @widget.versions.last.reify(has_one: true) }

          it "see the associated as it was at the time" do
            expect(@widget1.wotsit).to(eq(@wotsit))
          end

          it "not persist changes to the live association" do
            expect(@widget.reload.wotsit).to be_nil
          end
        end

        context "and then the model is updated" do
          before do
            Timecop.travel(1.second.since)
            @widget.update_attributes(name: "widget_3")
          end

          context "when reified" do
            before { @widget2 = @widget.versions.last.reify(has_one: true) }

            it "see the associated as it was at the time" do
              expect(@widget2.wotsit).to be_nil
            end
          end
        end
      end
    end
  end

  context "a has_many association" do
    before { @customer = Customer.create(name: "customer_0") }

    context "updated before the associated was created" do
      before do
        @customer.update_attributes!(name: "customer_1")
        @customer.orders.create!(order_date: Date.today)
      end

      context "when reified" do
        before { @customer0 = @customer.versions.last.reify(has_many: true) }

        it "see the associated as it was at the time" do
          expect(@customer0.orders).to(eq([]))
        end

        it "not persist changes to the live association" do
          expect(@customer.orders.reload).not_to(eq([]))
        end
      end

      context "when reified with option mark_for_destruction" do
        it "mark the associated for destruction" do
          @customer0 = @customer.versions.last.reify(has_many: true, mark_for_destruction: true)
          expect(@customer0.orders.map(&:marked_for_destruction?)).to(eq([true]))
        end
      end
    end

    context "where the association is created between model versions" do
      before do
        @order = @customer.orders.create!(order_date: "order_date_0")
        Timecop.travel(1.second.since)
        @customer.update_attributes(name: "customer_1")
      end

      context "when reified" do
        before { @customer0 = @customer.versions.last.reify(has_many: true) }

        it "see the associated as it was at the time" do
          expect(@customer0.orders.map(&:order_date)).to(eq(["order_date_0"]))
        end
      end

      context "and then a nested has_many association is created" do
        before { @order.line_items.create!(product: "product_0") }

        context "when reified" do
          before { @customer0 = @customer.versions.last.reify(has_many: true) }

          it "see the live version of the nested association" do
            expect(@customer0.orders.first.line_items.map(&:product)).to(eq(["product_0"]))
          end
        end
      end

      context "and then the associated is updated between model versions" do
        before do
          @order.update_attributes(order_date: "order_date_1")
          @order.update_attributes(order_date: "order_date_2")
          Timecop.travel(1.second.since)
          @customer.update_attributes(name: "customer_2")
          @order.update_attributes(order_date: "order_date_3")
        end

        context "when reified" do
          before { @customer1 = @customer.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@customer1.orders.map(&:order_date)).to(eq(["order_date_2"]))
          end

          it "not persist changes to the live association" do
            expect(@customer.orders.reload.map(&:order_date)).to(eq(["order_date_3"]))
          end
        end

        context "when reified opting out of has_many reification" do
          before { @customer1 = @customer.versions.last.reify(has_many: false) }

          it "see the associated as it is live" do
            expect(@customer1.orders.map(&:order_date)).to(eq(["order_date_3"]))
          end
        end

        context "and then the associated is destroyed" do
          before { @order.destroy }

          context "when reified" do
            before { @customer1 = @customer.versions.last.reify(has_many: true) }

            it "see the associated as it was at the time" do
              expect(@customer1.orders.map(&:order_date)).to(eq(["order_date_2"]))
            end

            it "not persist changes to the live association" do
              expect(@customer.orders.reload).to(eq([]))
            end
          end
        end
      end

      context "and then the associated is destroyed" do
        before { @order.destroy }

        context "when reified" do
          before { @customer1 = @customer.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@customer1.orders.map(&:order_date)).to(eq([@order.order_date]))
          end

          it "not persist changes to the live association" do
            expect(@customer.orders.reload).to(eq([]))
          end
        end
      end

      context "and then the associated is destroyed between model versions" do
        before do
          @order.destroy
          Timecop.travel(1.second.since)
          @customer.update_attributes(name: "customer_2")
        end

        context "when reified" do
          before { @customer1 = @customer.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@customer1.orders).to(eq([]))
          end
        end
      end

      context "and then another association is added" do
        before { @customer.orders.create!(order_date: "order_date_1") }

        context "when reified" do
          before { @customer0 = @customer.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@customer0.orders.map(&:order_date)).to(eq(["order_date_0"]))
          end

          it "not persist changes to the live association" do
            expect(
              @customer.orders.reload.map(&:order_date)
            ).to match_array(%w[order_date_0 order_date_1])
          end
        end

        context "when reified with option mark_for_destruction" do
          it "mark the newly associated for destruction" do
            @customer0 = @customer.versions.last.reify(has_many: true, mark_for_destruction: true)
            order = @customer0.orders.detect { |o| o.order_date == "order_date_1" }
            expect(order).to be_marked_for_destruction
          end
        end
      end
    end
  end

  context "has_many through associations" do
    context "Books, Authors, and Authorships" do
      before { @book = Book.create(title: "book_0") }

      context "updated before the associated was created" do
        before do
          @book.update_attributes!(title: "book_1")
          @book.authors.create!(name: "author_0")
        end

        context "when reified" do
          before { @book0 = @book.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@book0.authors).to(eq([]))
          end

          it "not persist changes to the live association" do
            expect(@book.authors.reload.map(&:name)).to(eq(["author_0"]))
          end
        end

        context "when reified with option mark_for_destruction" do
          before do
            @book0 = @book.versions.last.reify(has_many: true, mark_for_destruction: true)
          end

          it "mark the associated for destruction" do
            expect(@book0.authors.map(&:marked_for_destruction?)).to(eq([true]))
          end

          it "mark the associated-through for destruction" do
            expect(@book0.authorships.map(&:marked_for_destruction?)).to(eq([true]))
          end
        end
      end

      context "updated before it is associated with an existing one" do
        before do
          person_existing = Person.create(name: "person_existing")
          Timecop.travel(1.second.since)
          @book.update_attributes!(title: "book_1")
          (@book.authors << person_existing)
        end

        context "when reified" do
          before { @book0 = @book.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@book0.authors).to(eq([]))
          end
        end

        context "when reified with option mark_for_destruction" do
          before do
            @book0 = @book.versions.last.reify(has_many: true, mark_for_destruction: true)
          end

          it "not mark the associated for destruction" do
            expect(@book0.authors.map(&:marked_for_destruction?)).to(eq([false]))
          end

          it "mark the associated-through for destruction" do
            expect(@book0.authorships.map(&:marked_for_destruction?)).to(eq([true]))
          end
        end
      end

      context "where the association is created between model versions" do
        before do
          @author = @book.authors.create!(name: "author_0")
          @person_existing = Person.create(name: "person_existing")
          Timecop.travel(1.second.since)
          @book.update_attributes!(title: "book_1")
        end

        context "when reified" do
          before { @book0 = @book.versions.last.reify(has_many: true) }

          it "see the associated as it was at the time" do
            expect(@book0.authors.map(&:name)).to(eq(["author_0"]))
          end
        end

        context "and then the associated is updated between model versions" do
          before do
            @author.update_attributes(name: "author_1")
            @author.update_attributes(name: "author_2")
            Timecop.travel(1.second.since)
            @book.update_attributes(title: "book_2")
            @author.update_attributes(name: "author_3")
          end

          context "when reified" do
            before { @book1 = @book.versions.last.reify(has_many: true) }

            it "see the associated as it was at the time" do
              expect(@book1.authors.map(&:name)).to(eq(["author_2"]))
            end

            it "not persist changes to the live association" do
              expect(@book.authors.reload.map(&:name)).to(eq(["author_3"]))
            end
          end

          context "when reified opting out of has_many reification" do
            before { @book1 = @book.versions.last.reify(has_many: false) }

            it "see the associated as it is live" do
              expect(@book1.authors.map(&:name)).to(eq(["author_3"]))
            end
          end
        end

        context "and then the associated is destroyed" do
          before { @author.destroy }

          context "when reified" do
            before { @book1 = @book.versions.last.reify(has_many: true) }

            it "see the associated as it was at the time" do
              expect(@book1.authors.map(&:name)).to(eq([@author.name]))
            end

            it "not persist changes to the live association" do
              expect(@book.authors.reload).to(eq([]))
            end
          end
        end

        context "and then the associated is destroyed between model versions" do
          before do
            @author.destroy
            Timecop.travel(1.second.since)
            @book.update_attributes(title: "book_2")
          end

          context "when reified" do
            before { @book1 = @book.versions.last.reify(has_many: true) }

            it "see the associated as it was at the time" do
              expect(@book1.authors).to(eq([]))
            end
          end
        end

        context "and then the associated is dissociated between model versions" do
          before do
            @book.authors = []
            Timecop.travel(1.second.since)
            @book.update_attributes(title: "book_2")
          end

          context "when reified" do
            before { @book1 = @book.versions.last.reify(has_many: true) }

            it "see the associated as it was at the time" do
              expect(@book1.authors).to(eq([]))
            end
          end
        end

        context "and then another associated is created" do
          before { @book.authors.create!(name: "author_1") }

          context "when reified" do
            before { @book0 = @book.versions.last.reify(has_many: true) }

            it "only see the first associated" do
              expect(@book0.authors.map(&:name)).to(eq(["author_0"]))
            end

            it "not persist changes to the live association" do
              expect(@book.authors.reload.map(&:name)).to(eq(%w[author_0 author_1]))
            end
          end

          context "when reified with option mark_for_destruction" do
            before do
              @book0 = @book.versions.last.reify(has_many: true, mark_for_destruction: true)
            end

            it "mark the newly associated for destruction" do
              author = @book0.authors.detect { |a| a.name == "author_1" }
              expect(author).to be_marked_for_destruction
            end

            it "mark the newly associated-through for destruction" do
              authorship = @book0.authorships.detect { |as| as.author.name == "author_1" }
              expect(authorship).to be_marked_for_destruction
            end
          end
        end

        context "and then an existing one is associated" do
          before { (@book.authors << @person_existing) }

          context "when reified" do
            before { @book0 = @book.versions.last.reify(has_many: true) }

            it "only see the first associated" do
              expect(@book0.authors.map(&:name)).to(eq(["author_0"]))
            end

            it "not persist changes to the live association" do
              expect(@book.authors.reload.map(&:name).sort).to(eq(%w[author_0 person_existing]))
            end
          end

          context "when reified with option mark_for_destruction" do
            before do
              @book0 = @book.versions.last.reify(has_many: true, mark_for_destruction: true)
            end

            it "not mark the newly associated for destruction" do
              author = @book0.authors.detect { |a| a.name == "person_existing" }
              expect(author).not_to be_marked_for_destruction
            end

            it "mark the newly associated-through for destruction" do
              authorship = @book0.authorships.detect { |as| as.author.name == "person_existing" }
              expect(authorship).to be_marked_for_destruction
            end
          end
        end
      end

      context "updated before the associated without paper_trail was created" do
        before do
          @book.update_attributes!(title: "book_1")
          @book.editors.create!(name: "editor_0")
        end

        context "when reified" do
          before { @book0 = @book.versions.last.reify(has_many: true) }

          it "see the live association" do
            expect(@book0.editors.map(&:name)).to(eq(["editor_0"]))
          end
        end
      end
    end

    context "Chapters, Sections, Paragraphs, Quotations, and Citations" do
      before { @chapter = Chapter.create(name: CHAPTER_NAMES[0]) }

      context "before any associations are created" do
        before { @chapter.update_attributes(name: CHAPTER_NAMES[1]) }

        it "not reify any associations" do
          chapter_v1 = @chapter.versions[1].reify(has_many: true)
          expect(chapter_v1.name).to(eq(CHAPTER_NAMES[0]))
          expect(chapter_v1.sections).to(eq([]))
          expect(chapter_v1.paragraphs).to(eq([]))
        end
      end

      context "after the first has_many through relationship is created" do
        before do
          @chapter.update_attributes(name: CHAPTER_NAMES[1])
          Timecop.travel(1.second.since)
          @chapter.sections.create(name: "section 1")
          Timecop.travel(1.second.since)
          @chapter.sections.first.update_attributes(name: "section 2")
          Timecop.travel(1.second.since)
          @chapter.update_attributes(name: CHAPTER_NAMES[2])
          Timecop.travel(1.second.since)
          @chapter.sections.first.update_attributes(name: "section 3")
        end

        context "version 1" do
          it "have no sections" do
            chapter_v1 = @chapter.versions[1].reify(has_many: true)
            expect(chapter_v1.sections).to(eq([]))
          end
        end

        context "version 2" do
          it "have one section" do
            chapter_v2 = @chapter.versions[2].reify(has_many: true)
            expect(chapter_v2.sections.size).to(eq(1))
            expect(chapter_v2.sections.map(&:name)).to(eq(["section 2"]))
            expect(chapter_v2.name).to(eq(CHAPTER_NAMES[1]))
          end
        end

        context "version 2, before the section was destroyed" do
          before do
            @chapter.update_attributes(name: CHAPTER_NAMES[2])
            Timecop.travel(1.second.since)
            @chapter.sections.destroy_all
            Timecop.travel(1.second.since)
          end

          it "have the one section" do
            chapter_v2 = @chapter.versions[2].reify(has_many: true)
            expect(chapter_v2.sections.map(&:name)).to(eq(["section 2"]))
          end
        end

        context "version 3, after the section was destroyed" do
          before do
            @chapter.sections.destroy_all
            Timecop.travel(1.second.since)
            @chapter.update_attributes(name: CHAPTER_NAMES[3])
            Timecop.travel(1.second.since)
          end

          it "have no sections" do
            chapter_v3 = @chapter.versions[3].reify(has_many: true)
            expect(chapter_v3.sections.size).to(eq(0))
          end
        end

        context "after creating a paragraph" do
          before do
            @section = @chapter.sections.first
            Timecop.travel(1.second.since)
            @paragraph = @section.paragraphs.create(name: "para1")
          end

          context "new chapter version" do
            it "have one paragraph" do
              initial_section_name = @section.name
              initial_paragraph_name = @paragraph.name
              Timecop.travel(1.second.since)
              @chapter.update_attributes(name: CHAPTER_NAMES[4])
              expect(@chapter.versions.size).to(eq(4))
              Timecop.travel(1.second.since)
              @paragraph.update_attributes(name: "para3")
              chapter_v3 = @chapter.versions[3].reify(has_many: true)
              expect(chapter_v3.sections.map(&:name)).to(eq([initial_section_name]))
              paragraphs = chapter_v3.sections.first.paragraphs
              expect(paragraphs.size).to(eq(1))
              expect(paragraphs.map(&:name)).to(eq([initial_paragraph_name]))
            end
          end

          context "the version before a section is destroyed" do
            it "have the section and paragraph" do
              Timecop.travel(1.second.since)
              @chapter.update_attributes(name: CHAPTER_NAMES[3])
              expect(@chapter.versions.size).to(eq(4))
              Timecop.travel(1.second.since)
              @section.destroy
              expect(@chapter.versions.size).to(eq(4))
              chapter_v3 = @chapter.versions[3].reify(has_many: true)
              expect(chapter_v3.name).to(eq(CHAPTER_NAMES[2]))
              expect(chapter_v3.sections).to(eq([@section]))
              expect(chapter_v3.sections[0].paragraphs).to(eq([@paragraph]))
              expect(chapter_v3.paragraphs).to(eq([@paragraph]))
            end
          end

          context "the version after a section is destroyed" do
            it "not have any sections or paragraphs" do
              @section.destroy
              Timecop.travel(1.second.since)
              @chapter.update_attributes(name: CHAPTER_NAMES[5])
              expect(@chapter.versions.size).to(eq(4))
              chapter_v3 = @chapter.versions[3].reify(has_many: true)
              expect(chapter_v3.sections.size).to(eq(0))
              expect(chapter_v3.paragraphs.size).to(eq(0))
            end
          end

          context "the version before a paragraph is destroyed" do
            it "have the one paragraph" do
              initial_paragraph_name = @section.paragraphs.first.name
              Timecop.travel(1.second.since)
              @chapter.update_attributes(name: CHAPTER_NAMES[5])
              Timecop.travel(1.second.since)
              @paragraph.destroy
              chapter_v3 = @chapter.versions[3].reify(has_many: true)
              paragraphs = chapter_v3.sections.first.paragraphs
              expect(paragraphs.size).to(eq(1))
              expect(paragraphs.first.name).to(eq(initial_paragraph_name))
            end
          end

          context "the version after a paragraph is destroyed" do
            it "have no paragraphs" do
              @paragraph.destroy
              Timecop.travel(1.second.since)
              @chapter.update_attributes(name: CHAPTER_NAMES[5])
              chapter_v3 = @chapter.versions[3].reify(has_many: true)
              expect(chapter_v3.paragraphs.size).to(eq(0))
              expect(chapter_v3.sections.first.paragraphs).to(eq([]))
            end
          end
        end
      end

      context "a chapter with one paragraph and one citation" do
        it "reify paragraphs and citations" do
          chapter = Chapter.create(name: CHAPTER_NAMES[0])
          section = Section.create(name: "Section One", chapter: chapter)
          paragraph = Paragraph.create(name: "Paragraph One", section: section)
          quotation = Quotation.create(chapter: chapter)
          citation = Citation.create(quotation: quotation)
          Timecop.travel(1.second.since)
          chapter.update_attributes(name: CHAPTER_NAMES[1])
          expect(chapter.versions.count).to(eq(2))
          paragraph.destroy
          citation.destroy
          reified = chapter.versions[1].reify(has_many: true)
          expect(reified.sections.first.paragraphs).to(eq([paragraph]))
          expect(reified.quotations.first.citations).to(eq([citation]))
        end
      end
    end
  end

  context "belongs_to associations" do
    context "Wotsit and Widget" do
      before { @widget = Widget.create(name: "widget_0") }

      context "where the association is created between model versions" do
        before do
          @wotsit = Wotsit.create(name: "wotsit_0")
          Timecop.travel(1.second.since)
          @wotsit.update_attributes(widget_id: @widget.id, name: "wotsit_1")
        end

        context "when reified" do
          before { @wotsit0 = @wotsit.versions.last.reify(belongs_to: true) }

          it "see the associated as it was at the time" do
            expect(@wotsit0.widget).to be_nil
          end

          it "not persist changes to the live association" do
            expect(@wotsit.reload.widget).to(eq(@widget))
          end
        end

        context "and then the associated is updated between model versions" do
          before do
            @widget.update_attributes(name: "widget_1")
            @widget.update_attributes(name: "widget_2")
            Timecop.travel(1.second.since)
            @wotsit.update_attributes(name: "wotsit_2")
            @widget.update_attributes(name: "widget_3")
          end

          context "when reified" do
            before { @wotsit1 = @wotsit.versions.last.reify(belongs_to: true) }

            it "see the associated as it was at the time" do
              expect(@wotsit1.widget.name).to(eq("widget_2"))
            end

            it "not persist changes to the live association" do
              expect(@wotsit.reload.widget.name).to(eq("widget_3"))
            end
          end

          context "when reified opting out of belongs_to reification" do
            before { @wotsit1 = @wotsit.versions.last.reify(belongs_to: false) }

            it "see the associated as it is live" do
              expect(@wotsit1.widget.name).to(eq("widget_3"))
            end
          end
        end

        context "and then the associated is destroyed" do
          before do
            @wotsit.update_attributes(name: "wotsit_2")
            @widget.destroy
          end

          context "when reified with belongs_to: true" do
            before { @wotsit2 = @wotsit.versions.last.reify(belongs_to: true) }

            it "see the associated as it was at the time" do
              expect(@wotsit2.widget).to(eq(@widget))
            end

            it "not persist changes to the live association" do
              expect(@wotsit.reload.widget).to be_nil
            end

            it "be able to persist the reified record" do
              expect { @wotsit2.save! }.not_to(raise_error)
            end
          end

          context "when reified with belongs_to: false" do
            before { @wotsit2 = @wotsit.versions.last.reify(belongs_to: false) }

            it "save should not re-create the widget record" do
              @wotsit2.save!
              expect(::Widget.find_by(id: @widget.id)).to be_nil
            end
          end

          context "and then the model is updated" do
            before do
              Timecop.travel(1.second.since)
              @wotsit.update_attributes(name: "wotsit_3")
            end

            context "when reified" do
              before { @wotsit2 = @wotsit.versions.last.reify(belongs_to: true) }

              it "see the associated as it was the time" do
                expect(@wotsit2.widget).to be_nil
              end
            end
          end
        end
      end

      context "where the association is changed between model versions" do
        before do
          @wotsit = @widget.create_wotsit(name: "wotsit_0")
          Timecop.travel(1.second.since)
          @new_widget = Widget.create(name: "new_widget")
          @wotsit.update_attributes(widget_id: @new_widget.id, name: "wotsit_1")
        end

        context "when reified" do
          before { @wotsit0 = @wotsit.versions.last.reify(belongs_to: true) }

          it "see the association as it was at the time" do
            expect(@wotsit0.widget.name).to(eq("widget_0"))
          end

          it "not persist changes to the live association" do
            expect(@wotsit.reload.widget).to(eq(@new_widget))
          end
        end

        context "when reified with option mark_for_destruction" do
          before do
            @wotsit0 = @wotsit.versions.last.reify(belongs_to: true, mark_for_destruction: true)
          end

          it "does not mark the new associated for destruction" do
            expect(@new_widget.marked_for_destruction?).to(eq(false))
          end
        end
      end
    end
  end

  context "has_and_belongs_to_many associations" do
    context "foo and bar" do
      before do
        @foo = FooHabtm.create(name: "foo")
        Timecop.travel(1.second.since)
      end

      context "where the association is created between model versions" do
        before do
          @foo.update_attributes(name: "foo1", bar_habtms: [BarHabtm.create(name: "bar")])
        end

        context "when reified" do
          before do
            @reified = @foo.versions.last.reify(has_and_belongs_to_many: true)
          end

          it "see the associated as it was at the time" do
            expect(@reified.bar_habtms.length).to(eq(0))
          end

          it "not persist changes to the live association" do
            expect(@foo.reload.bar_habtms).not_to(eq(@reified.bar_habtms))
          end
        end
      end

      context "where the association is changed between model versions" do
        before do
          @foo.update_attributes(name: "foo2", bar_habtms: [BarHabtm.create(name: "bar2")])
          Timecop.travel(1.second.since)
          @foo.update_attributes(name: "foo3", bar_habtms: [BarHabtm.create(name: "bar3")])
        end

        context "when reified" do
          before do
            @reified = @foo.versions.last.reify(has_and_belongs_to_many: true)
          end

          it "see the association as it was at the time" do
            expect(@reified.bar_habtms.first.name).to(eq("bar2"))
          end

          it "not persist changes to the live association" do
            expect(@foo.reload.bar_habtms.first).not_to(eq(@reified.bar_habtms.first))
          end
        end

        context "when reified with has_and_belongs_to_many: false" do
          before { @reified = @foo.versions.last.reify }

          it "see the association as it is now" do
            expect(@reified.bar_habtms.first.name).to(eq("bar3"))
          end
        end
      end

      context "where the association is destroyed between model versions" do
        before do
          @foo.update_attributes(name: "foo2", bar_habtms: [BarHabtm.create(name: "bar2")])
          Timecop.travel(1.second.since)
          @foo.update_attributes(name: "foo3", bar_habtms: [])
        end

        context "when reified" do
          before do
            @reified = @foo.versions.last.reify(has_and_belongs_to_many: true)
          end

          it "see the association as it was at the time" do
            expect(@reified.bar_habtms.first.name).to(eq("bar2"))
          end

          it "not persist changes to the live association" do
            expect(@foo.reload.bar_habtms.first).not_to(eq(@reified.bar_habtms.first))
          end
        end
      end

      context "where the unassociated model changes" do
        before do
          @bar = BarHabtm.create(name: "bar2")
          @foo.update_attributes(name: "foo2", bar_habtms: [@bar])
          Timecop.travel(1.second.since)
          @foo.update_attributes(name: "foo3", bar_habtms: [BarHabtm.create(name: "bar4")])
          Timecop.travel(1.second.since)
          @bar.update_attributes(name: "bar3")
        end

        context "when reified" do
          before do
            @reified = @foo.versions.last.reify(has_and_belongs_to_many: true)
          end

          it "see the association as it was at the time" do
            expect(@reified.bar_habtms.first.name).to(eq("bar2"))
          end

          it "not persist changes to the live association" do
            expect(@foo.reload.bar_habtms.first).not_to(eq(@reified.bar_habtms.first))
          end
        end
      end
    end

    context "updated via nested attributes" do
      before do
        @foo = FooHabtm.create(name: "foo", bar_habtms_attributes: [{ name: "bar" }])
        Timecop.travel(1.second.since)
        @foo.update_attributes(
          name: "foo2",
          bar_habtms_attributes: [{ id: @foo.bar_habtms.first.id, name: "bar2" }]
        )
        @reified = @foo.versions.last.reify(has_and_belongs_to_many: true)
      end

      it "see the associated object as it was at the time" do
        expect(@reified.bar_habtms.first.name).to(eq("bar"))
      end

      it "not persist changes to the live object" do
        expect(@foo.reload.bar_habtms.first.name).not_to(eq(@reified.bar_habtms.first.name))
      end
    end
  end
end


text:
package com.emisi.presentation.semantic;

import com.emisi.dao.ImagenDAOImpl;
import com.emisi.model.Imagen;
import com.emisi.presentation.TemplateIndex;
import com.emisi.presentation.pages.ImagenPage;
import com.emisi.util.DicomUtils;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.ListDataProvider;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.dcm4che2.data.DicomObject;

import java.util.List;

public class SimilarPage extends TemplateIndex {

	private static final long serialVersionUID = 1L;

	@SpringBean(name = "dao.custom.imagen")
	private ImagenDAOImpl dao;

	public SimilarPage(final PageParameters parameters) {
		super(parameters);

		final String id = parameters.getString("idImagen");
		add(new Label("imagen.id", id));

		final List<Imagen> imagenes = dao.similar(id);

		@SuppressWarnings("unchecked")
		final DataView dataView = new DataView("tablaImagen", new ListDataProvider(
				imagenes)) {

			@Override
			protected void populateItem(Item item) {
				final Imagen imagen = (Imagen) item.getModelObject();

				if (imagen == null) {
					item.add(new Label("id", "-"));
					item.add(new Label("serieId", "-"));
					item.add(new Label("modalidad", "N/A"));
					item.add(new Label("imagen", "Imagen no disponible."));
					return;
				}

				item.add(new Label("id", imagen.getIdImagen().substring(0, 9)
						.concat("...")
						.concat(imagen.getIdImagen().substring((imagen.getIdImagen().length() - 9), imagen.getIdImagen().length()))));
				item.add(new Label("serieId", imagen.getFkSerie()
						.concat("...")
						.concat(imagen.getFkSerie().substring((imagen.getFkSerie().length() - 9), imagen.getFkSerie().length()))));
				item.add(new Label("modalidad", "--"));

				//link al detalle de la imagen
				PageParameters pars = new PageParameters();
				pars.add("id", imagen.getIdImagen());

				BookmarkablePageLink linkDetalle = new BookmarkablePageLink("detalle", ImagenPage.class, pars);

				try {
					DicomObject dcmObj = DicomUtils.getDicomObject(imagen.getDicom());
					linkDetalle.add(DicomUtils.getImageFromDicom(dcmObj));
				} catch (Exception e1) {
					item.add(new Label("imagen", "Imagen no disponible."));
					e1.printStackTrace();
				}

				item.add(linkDetalle);

			}
		};

		dataView.setItemsPerPage(10);

		add(dataView);

		add(new PagingNavigator("navigator", dataView));

	}

}


text:
module MeTooHelper
  def me() "me too!" end
end


text:
using System;
using BACnet.Types;
using BACnet.Types.Schemas;

namespace BACnet.Ashrae
{
	public enum SilencedState : uint
	{
		Unsilenced = 0,
		AudibleSilenced = 1,
		VisibleSilenced = 2,
		AllSilenced = 3
	}
}


text:
package edu.rit.cs;

import java.util.Arrays;

public final class DataBlock
	implements Block
{
	private final long   index;
	private final byte[] buffer;
	private final byte[] hashval;

	/** Hide the default constructor */
	private DataBlock()
	{
		index = -1;
		buffer = null;
		hashval = null;
	}

	/**
	 * Build a new DataBlock that contains a hash value, and a data
	 * buffer. The block for now supports an index field that indicates where
	 * it lies in a contiguous data structure.
	 * @param buf Backing byte buffer for the block
	 * @param hval Hash value in byte array for the block
	 */
	public DataBlock(byte[] buf, byte[] hval, long idx)
		throws IllegalArgumentException
	{
		if(buf == null || hval == null)
			throw new IllegalArgumentException("Invalid block buffers");
		if(idx < 0)
			throw new IllegalArgumentException("Block index must be >= 0");

		buffer = buf;
		hashval = hval;
		index = idx;
	}

	/** Return size of block data buffer */
	@Override
	public long length()
	{ return buffer.length; }

	/** Return index of block within file */
	@Override
	public long index()
	{ return index; }

	/**
	 * Return a reference to the underlying data buffer.
	 */
	@Override
	public byte[] data()
	{
		return buffer;
	}

	/**
	 * Return a reference to the underlying hash value buffer.
	 */
	public byte[] hash()
	{
		return hashval;
	}
}


text:
package jef.database.support;

import java.lang.instrument.IllegalClassFormatException;
import java.net.URL;
import java.security.ProtectionDomain;

import jef.codegen.EnhanceTaskASM;
import jef.tools.IOUtils;
import jef.tools.resource.ClasspathLoader;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class GqClassFileTransformer implements java.lang.instrument.ClassFileTransformer {
    private Logger log = LoggerFactory.getLogger(GqClassFileTransformer.class);

    @Override
    public byte[] transform(ClassLoader loader, String name, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer)
            throws IllegalClassFormatException {
        if (name.startsWith("jef/database") || name.startsWith("org/apache") || name.startsWith("javax/"))
            return null;
        if (name.indexOf('$') > -1) {
            return null;
        }
        URL u1 = loader.getResource(name.replace('.', '/') + ".class");
        if (u1 == null)
            return null;

        URL u2 = loader.getResource(name.replace('.', '/') + "$Field.class");
        EnhanceTaskASM task = new EnhanceTaskASM(new ClasspathLoader(false, loader));
        byte[] enhanced;
        try {
            enhanced = task.doEnhance(IOUtils.toByteArray(u1), u2 == null ? null : IOUtils.toByteArray(u2));
        } catch (Exception e) {
            log.error("类动态增强错误", e);
            return null;
        }
        if (enhanced == null || enhanced.length == 0) {
            return null;
        }
        log.info("Runtime Enhance Class For Easyframe ORM: {}", name);
        return enhanced;
    }

}


text:
set -e

echo "Docker nothing to configure"

exit 0