text:
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation.
// All rights reserved.
//
// This code is licensed under the MIT License.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//------------------------------------------------------------------------------

using Microsoft.IdentityModel.Clients.ActiveDirectory;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace XFormsApp
{
    public class SecondPage : ContentPage
    {
        private readonly StringBuilder _logs = new StringBuilder();

        public string User = "<User>";
        private string Tenant = "<Tenant>";
        public const string AndroidBrokerRedirectURI = "msauth://com.microsoft.xformsdroid.adal/h9/XUqAd80F9odQHvfN02DYklMA=";
        public const string IOSBrokerRedirectURI = "adaliosapp://com.yourcompany.xformsapp";
        static string RedirectURI = "urn:ietf:wg:oauth:2.0:oob";

        public string DrainLogs()
        {
            string output = _logs.ToString();
            _logs.Clear();
            return output;
        }

        private readonly Label result;
        private readonly Label testResult;
        private readonly Picker clientIdPicker;
        private readonly Picker resourcePicker;
        private readonly Picker promptBehaviorPicker;
        private readonly Entry clientIdInput;
        private readonly Entry resourceInput;
        private readonly Entry promptBehaviorInput;

        private string ClientId { get; set; } = AppConstants.UiAutomationTestClientId;
        private string Resource { get; set; } = AppConstants.MSGraph;

        public IPlatformParameters BrokerParameters { get; set; }

        public string PlatformParameters { get; set; }

        public AuthenticationContext AuthContext { get; set; } = new AuthenticationContext("https://login.microsoftonline.com/common");

        private AuthenticationResult AuthResult { get; set; }
        private string AccessToken { get; set; }
        private string UserIdentifier { get; set; }

        public SecondPage()
        {
            var acquireTokenButton = new Button
            {
                Text = "Acquire Token",
                AutomationId = "acquireToken"
            };

            var acquireTokenSilentButton = new Button
            {
                Text = "Acquire Token Silent",
                AutomationId = "acquireTokenSilent"
            };

            var clearAllCacheButton = new Button
            {
                Text = "Clear All Cache",
                AutomationId = "clearCache"
            };

            var acquireTokenWithBrokerButton = new Button
            {
                Text = "Acquire Token With Broker",
                AutomationId = "acquireTokenBroker"
            };

            var acquireTokenSilentWithBrokerButton = new Button
            {
                Text = "Acquire Token Silent With Broker",
                AutomationId = "acquireTokenSilentWithBroker"
            };

            var silentAuthGuestTenantButton = new Button
            {
                Text = "Acquire Token Silent With Guest Tenant",
                AutomationId = "acquireTokenSilentWithGuestTenant"
            };

            testResult = new Label()
            {
                Text = "Success:",
                VerticalOptions = LayoutOptions.FillAndExpand,
                AutomationId = "testResult"
            };

            result = new Label()
            {
                VerticalOptions = LayoutOptions.FillAndExpand
            };

            var clientIdInputLabel = new Label
            {
                Text = "CientId:"
            };

            var resourceInputLabel = new Label
            {
                Text = "Resource:"
            };

            var promptBehaviorLabel = new Label
            {
                Text = "Prompt Behavior:"
            };

            clientIdPicker = new Picker
            {
                Title = "Pick an application",
                ItemsSource = new List<string>(AppConstants.LabelToApplicationUriMap.Keys),
                AutomationId = "clientIdPicker"
            };

            resourcePicker = new Picker
            {
                Title = "Pick a resource",
                ItemsSource = new List<string>(AppConstants.LabelToResourceUriMap.Keys),
                AutomationId = "resourcePicker"
            };

            promptBehaviorPicker = new Picker
            {
                Title = "Select a prompt behavior",
                ItemsSource = new List<string>(AppConstants.PromptBehaviorList),
                AutomationId = "promptBehaviorPicker"
            };

            clientIdInput = new Entry
            {
                Text = AppConstants.UiAutomationTestClientId,
                AutomationId = "clientIdEntry"
            };

            resourceInput = new Entry
            {
                Text = AppConstants.MSGraph,
                AutomationId = "resourceEntry"
            };

            promptBehaviorInput = new Entry
            {
                Text = "auto",
                AutomationId = "promptBehaviorEntry"
            };

            var scrollView = new ScrollView()
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                Orientation = ScrollOrientation.Vertical,
                Content = new StackLayout()
                {
                    Children =
                    {
                        testResult,
                        result
                    }
                }
            };

            acquireTokenButton.Clicked += AcquireTokenButton_Clicked;
            acquireTokenSilentButton.Clicked += AcquireTokenSilentButton_Clicked;
            clearAllCacheButton.Clicked += ClearAllCacheButton_Clicked;
            acquireTokenWithBrokerButton.Clicked += AcquireTokenWithBrokerButton_Clicked;
            acquireTokenSilentWithBrokerButton.Clicked += AcquireTokenSilentWithBrokerButton_Clicked;
            silentAuthGuestTenantButton.Clicked += AcquireTokenSilentWithGuestTenantButton_Clicked;
            clientIdPicker.SelectedIndexChanged += UpdateClientId;
            resourcePicker.SelectedIndexChanged += UpdateResourceId;
            clientIdInput.TextChanged += UpdateClientIdFromInput;
            resourceInput.TextChanged += UpdateResourceFromInput;
            promptBehaviorPicker.SelectedIndexChanged += UpdatePromptBehavior;
            promptBehaviorInput.TextChanged += UpdatePromptBehaviorFromInput;

            Thickness padding;

            switch (Device.RuntimePlatform)
            {
                case Device.iOS:
                    padding = new Thickness(0, 40, 0, 0);
                    break;
                case Device.UWP:
                    padding = new Thickness(0, 20, 0, 0);
                    break;
                default:
                    padding = new Thickness(0, 0, 0, 0);
                    break;
            }

            Content = new StackLayout
            {
                Padding = padding,
                VerticalOptions = LayoutOptions.FillAndExpand,
                Children = {
                    acquireTokenButton,
                    acquireTokenSilentButton,
                    clearAllCacheButton,
                    acquireTokenWithBrokerButton,
                    acquireTokenSilentWithBrokerButton,
                    silentAuthGuestTenantButton,
                    clientIdPicker,
                    clientIdInput,
                    resourcePicker,
                    resourceInput,
                    promptBehaviorPicker,
                    promptBehaviorInput,
                    scrollView
                }
            };

            void LogCallback(LogLevel level, string message, bool containsPii)
            {
                _logs.AppendLine(message);
            }

            LoggerCallbackHandler.LogCallback = LogCallback;
        }

        private async void AcquireTokenButton_Clicked(object sender, EventArgs e)
        {
            result.Text = string.Empty;

            string output = string.Empty;
            string accessToken = string.Empty;
            testResult.Text = "Result:";

            try
            {
                var factory = DependencyService.Get<IPlatformParametersFactory>();
                IPlatformParameters platformParameters = factory.GetPlatformParameters(PlatformParameters);

                AuthenticationResult result =
                    await
                        AuthContext.AcquireTokenAsync(Resource, ClientId, new Uri(RedirectURI), platformParameters).ConfigureAwait(false);
                output = "Signed in User - " + result.UserInfo.DisplayableId;
                accessToken = result.AccessToken;
                User = result.UserInfo.DisplayableId;
                Tenant = result.TenantId;
            }
            catch (Exception exc)
            {
                output = exc.Message;
            }
            finally
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    testResult.Text = string.IsNullOrWhiteSpace(accessToken) ? "Result: Failure" : "Result: Success";
                    result.Text += "Result : " + output;
                    result.Text += "Logs : " + DrainLogs();
                });
            }
        }

        private async void AcquireTokenSilentButton_Clicked(object sender, EventArgs e)
        {
            result.Text = string.Empty;
            AuthenticationContext ctx = new AuthenticationContext("https://login.microsoftonline.com/" + Tenant);
            string output = string.Empty;
            string accessToken = string.Empty;
            testResult.Text = "Result:";
            try
            {
                AuthenticationResult result = await ctx.AcquireTokenSilentAsync(Resource, ClientId,
                                              new UserIdentifier(User, UserIdentifierType.OptionalDisplayableId)).ConfigureAwait(false);
                output = "Signed in User - " + result.UserInfo.DisplayableId;
                accessToken = result.AccessToken;
            }
            catch (Exception exc)
            {
                output = exc.Message;
            }
            finally
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    testResult.Text = string.IsNullOrWhiteSpace(accessToken) ? "Result: Failure" : "Result: Success";
                    result.Text += "Result : " + output;
                    result.Text += "Logs : " + DrainLogs();
                });
            }
        }

        private async void AcquireTokenWithBroker()
        {
            result.Text = string.Empty;
            AuthenticationContext ctx = new AuthenticationContext("https://login.microsoftonline.com/common");
            string output = string.Empty;
            string accessToken = string.Empty;
            testResult.Text = "Result:";

            try
            {
                AuthenticationResult result =
                    await
                        ctx.AcquireTokenAsync(Resource, ClientId,
                            new Uri(DeterminePlatformForRedirectUri()),
                            BrokerParameters).ConfigureAwait(false);
                output = "Signed in User - " + result.UserInfo.DisplayableId;
                accessToken = result.AccessToken;
                User = result.UserInfo.DisplayableId;
            }
            catch (Exception exc)
            {
                output = exc.Message;
            }
            finally
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    testResult.Text = string.IsNullOrWhiteSpace(accessToken) ? "Result: Failure" : "Result: Success";
                    result.Text += "Result : " + output;

                    result.Text += "Logs : " + DrainLogs();
                });
            }
        }

        private async void AcquireTokenSilentWithBroker()
        {
            result.Text = string.Empty;
            AuthenticationContext ctx = new AuthenticationContext("https://login.microsoftonline.com/common");
            string output = string.Empty;
            string accessToken = String.Empty;
            testResult.Text = "Result:";
            try
            {
                AuthenticationResult result = await ctx.AcquireTokenSilentAsync(Resource, ClientId,
                    new UserIdentifier(User, UserIdentifierType.OptionalDisplayableId), BrokerParameters).ConfigureAwait(false);
                output = "Signed in User - " + result.UserInfo.DisplayableId;
                accessToken = result.AccessToken;
            }
            catch (Exception exc)
            {
                output = exc.Message;
            }
            finally
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    testResult.Text = string.IsNullOrWhiteSpace(accessToken) ? "Result: Failure" : "Result: Success";
                    result.Text += "Result : " + output;

                    result.Text += "Logs : " + DrainLogs();
                });
            }
        }

        private void AcquireTokenWithBrokerButton_Clicked(object sender, EventArgs e)
        {
            switch (Device.RuntimePlatform)
            {
                case Device.iOS:
                    AcquireTokenWithBroker();
                    break;
                case Device.Android:
                    AcquireTokenWithBroker();
                    break;
                case Device.UWP:
                    result.Text = "UWP does not support broker. Use iOS or Android.";
                    break;
                default:
                    throw new NotImplementedException();
            }
        }

        private void AcquireTokenSilentWithBrokerButton_Clicked(object sender, EventArgs e)
        {
            switch (Device.RuntimePlatform)
            {
                case Device.iOS:
                    AcquireTokenSilentWithBroker();
                    break;
                case Device.Android:
                    AcquireTokenSilentWithBroker();
                    break;
                case Device.UWP:
                    result.Text = "UWP does not support broker. Use iOS or Android.";
                    break;
                default:
                    throw new NotImplementedException();
            }
        }

        private async void AcquireTokenSilentWithGuestTenantButton_Clicked(object sender, EventArgs e)
        {
            TokenCache tokenCache = new TokenCache();

            // sign in to both using the corp account;

            // your corp account is a normal account in this tentant
            AuthenticationContext homeAccount = new AuthenticationContext("https://login.microsoftonline.com/microsoft.onmicrosoft.com/", tokenCache);

            // your corp account is a guest account in this tenant
            AuthenticationContext guestAccount = new AuthenticationContext("https://login.microsoftonline.com/msidentitysamplestesting.onmicrosoft.com", tokenCache);

            await AcquireAndLogAsync(guestAccount, Resource, "Guest Tenant:\n").ConfigureAwait(false);

            await AcquireAndLogAsync(homeAccount, Resource, "Home Tenant:\n", AuthResult.UserInfo).ConfigureAwait(false);
        }

        private async Task AcquireAndLogAsync(AuthenticationContext authContext, string resource, string tenantType, UserInfo userInfo = null)
        {
            string clientId = "1c778544-53e4-492d-bfab-902cc4b968da";
            var factory = DependencyService.Get<IPlatformParametersFactory>();
            IPlatformParameters platformParameters = factory.GetPlatformParameters(PlatformParameters);
            AuthenticationResult authResult;

            try
            {
                authResult = await authContext.AcquireTokenSilentAsync(resource, clientId).ConfigureAwait(false);
                SetValuesFromAuthResult(authResult);
            }
            catch (AdalException adalException)
            {
                if (adalException.ErrorCode == AdalError.FailedToAcquireTokenSilently ||
                    adalException.ErrorCode == AdalError.InteractionRequired)
                {
                    if (userInfo != null)
                    {
                        authResult = await authContext.AcquireTokenAsync(
                            resource,
                            ClientId,
                            new Uri(RedirectURI),
                            platformParameters,
                            new UserIdentifier(
                                userInfo.UniqueId,
                                UserIdentifierType.UniqueId),
                            null).ConfigureAwait(false);
                        SetValuesFromAuthResult(authResult);
                    }
                    else
                    {
                        authResult = await authContext.AcquireTokenAsync(
                            resource,
                            clientId,
                            new Uri(RedirectURI),
                            platformParameters).ConfigureAwait(false);
                        SetValuesFromAuthResult(authResult);
                    }
                }
                else
                {
                    throw adalException;
                }
            }
            finally
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    result.Text += tenantType +
                    "Access token:\n" + AccessToken +
                    "\nUser.Identifier: " + UserIdentifier;
                    result.Text += "\nLogs : " + DrainLogs();
                });
            }
        }

        private void SetValuesFromAuthResult(AuthenticationResult authResult)
        {
            AuthResult = authResult;
            AccessToken = authResult.AccessToken;
            UserIdentifier = authResult.UserInfo.DisplayableId;
        }

        private string DeterminePlatformForRedirectUri()
        {
            switch (Device.RuntimePlatform)
            {
                case Device.iOS:
                    RedirectURI = IOSBrokerRedirectURI;
                    break;
                case Device.Android:
                    RedirectURI = AndroidBrokerRedirectURI;
                    break;
                default:
                    throw new NotImplementedException();
            }
            return RedirectURI;
        }

        void ClearAllCacheButton_Clicked(object sender, EventArgs e)
        {
            Device.BeginInvokeOnMainThread(() =>
            {
                result.Text = "Cache items before clear: " + TokenCache.DefaultShared.Count + Environment.NewLine;
                TokenCache.DefaultShared.Clear();
                result.Text += "Cache items after clear: " + TokenCache.DefaultShared.Count + Environment.NewLine;
            });
        }

        void UpdateClientId(object sender, EventArgs e)
        {
            ClientId = clientIdInput.Text = AppConstants.LabelToApplicationUriMap.Where(x => x.Key == (string)clientIdPicker.SelectedItem).FirstOrDefault().Value;
        }

        void UpdateResourceId(object sender, EventArgs e)
        {
            Resource = resourceInput.Text = AppConstants.LabelToResourceUriMap.Where(x => x.Key == (string)resourcePicker.SelectedItem).FirstOrDefault().Value;
        }

        void UpdatePromptBehavior(object sender, EventArgs e)
        {
            PlatformParameters = promptBehaviorInput.Text = AppConstants.PromptBehaviorList.Where(x => x == (string)promptBehaviorPicker.SelectedItem).FirstOrDefault();
        }

        void UpdateClientIdFromInput(object sender, EventArgs e)
        {
            ClientId = clientIdInput.Text;
        }

        private void UpdateResourceFromInput(object sender, TextChangedEventArgs e)
        {
            Resource = resourceInput.Text;
        }

        private void UpdatePromptBehaviorFromInput(object sender, TextChangedEventArgs e)
        {
            PlatformParameters = promptBehaviorInput.Text;
        }
    }
}


text:
package org.kuali.rice.krms.impl.repository;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.kuali.rice.krms.api.repository.RuleRepositoryService;
import org.kuali.rice.krms.api.repository.term.TermRepositoryService;
import org.kuali.rice.test.remote.RemoteTestHarness;

public class TermRepositoryServiceRemoteTest extends TermRepositoryServiceTest {

        RemoteTestHarness harness = new RemoteTestHarness();

    @Before
    @Override
    public void setupServiceUnderTest() {
        try {
            super.setupServiceUnderTest();
            TermRepositoryService remoteProxy =
                    harness.publishEndpointAndReturnProxy(TermRepositoryService.class, this.getTermRepositoryServiceImpl());
            super.setTermRepositoryService(remoteProxy);
        } catch (Throwable t) {
            Assert.fail("https://jira.kuali.org/browse/KULRICE-9848 " + t.getMessage());
        }
    }

    @After
    public void unPublishEndpoint() {
        harness.stopEndpoint();
    }
}

redpajama_set_name: RedPajamaGithub


text:
import Post from '../../layouts/essay'

// Components
import P from '../../components/paragraph'
import Link from '../../components/link'
import Meta from '../../components/meta'

export default () => (
  <Post>
    <Meta id="its-zeit" hasCover />

      On March the 30th, around midnight,
      {' '}
      <Link href="https://twitter.com/rauchg">Guillermo Rauch</Link>
      {' '}
      received
      an email from a guy who had noticed earlier that the person
      he was writing to was in the process of establishing a new company.

      And since the sender of said message has already been
      a huge fan of Guillermo's previous projects, he was asking whether
      or not he could help pushing it forward.

A few hours later, Mr. Rauch answered.

      Now, almost 4 months later, a lot of awesome work has been
      created: Designs, Concepts and Open Source software. All of
      them have contributed to
      {' '}
      <Link href="https://zeit.co">ZEIT</Link>
      {' '}— a company whose
      mission it is to build great cloud solutions and
      software for developers and other creatives.

I'm that guy.

Why? Me?! A 18-year-old teenager?

      I mean, just a few months before this happened, I've
      decided to end my apprenticeship at a local agency, drop out of
      vocational school and
      {' '}
      <Link href="https://medium.com/@leo/im-going-freelance">focus</Link>
      {' '}
      on
      doing high quality work for a handful of clients which
      I had known from working for various other teams for the last 7 years.

And guess what? Now I'm joining ZEIT full-time! 🎉

      It's funny, isn't it? Yea, in the beginning I couldn't believe
      it either. But it looks like — thanks to all of the effort I've
      pushed into this whole dream of creating awesome software — someone
      finally decided to hand me the freedom, resources and options to unleash
      my full potential.

      From now on, I'll be leading
      {' '}
      <Link href="https://github.com/zeit">Open Source</Link>
      {' '}
      and
      everything related to our community-facing projects.

      But enough of this! I don't want to reveal
      too much. If you like good software and neat products in general (I'm sure you do), just
      follow
      {' '}
      <Link href="https://twitter.com/notquiteleo">me</Link>
      {' '}
      and
      {' '}
      <Link href="https://twitter.com/zeithq">ZEIT</Link>
      ,
      grab some 🍿 and be amazed! 😛

  </Post>
)


text:
  #fill in the outline here:
  # create empty containers for b,i,n,g,o, and use random number 1-100.
  # pair those two together(perhaps as key value?)

# Check the called column for the number called.
  #fill in the outline here
  # IF letter matches a column, search for the number in the column.(iterate through multiple stacks perhaps)

# If the number is in the column, replace with an 'x'
  #fill in the outline here
  # IF number is there, #map! it, or otherwise replace with an 'x'

# Display a column to the console
  #fill in the outline here
  # same as display board but with more arguments?

# Display the board to the console (prettily)
  #fill in the outline here
  # just print it out nicely with BINGO at top

# Initial Solution

# class BingoBoard

#   def initialize(board)
#     @bingo_board = board
#   end

#   def num_and_letter
#     @num = rand(1..100)
#     @letter = rand(0..4)
#     @p_letter

#     case @letter
#     when 0
#       @p_letter = "B "
#     when 1
#       @p_letter = "I "
#     when 2
#       @p_letter = "N "
#     when 3
#       @p_letter = "G "
#     else
#       @p_letter = "O "
#     end

#     puts @p_letter + @num.to_s
#   end

#   def check_board
#     @bingo_board.each do |row|
#       if row[@letter] == @num
#         row[@letter] = "X"
#       end
#     end
#   end

#   def show_board
#     @bingo_board.each do |row|
#       p row
#     end
#     puts
#   end
# end

# Refactored Solution

class BingoBoard

  def initialize(board)
    @bingo_board = board
  end

  #optional
  def create_board
    @legal_board = Array.new(5) { Array.new(5) }
    b_list = [
      [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
      [16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],
      [31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],
      [46,47,48,49,50,51,52,53,54,55,56,57,58,59,60],
      [61,62,63,64,65,66,67,68,69,70,71,72,73,74,75]]
    b_counter = 0

    @legal_board.each do |row|
      while b_counter < 5
        row[b_counter] = b_list[b_counter].sample

        del_formula = row[b_counter] - (1 + (15 * b_counter))

        b_list[b_counter].delete_at(del_formula)
        b_counter += 1
      end
      b_counter = 0
    end
    @legal_board[2][2] = "X"
  end

  def num_and_letter
    @num = rand(1..100)
    @letter = rand(0..4)

    case @letter
    when 0
      p_letter = "B "
    when 1
      p_letter = "I "
    when 2
      p_letter = "N "
    when 3
      p_letter = "G "
    else
      p_letter = "O "
    end

    puts p_letter + @num.to_s
  end

  def check_board
    @bingo_board.each do |row|
      if row[@letter] == @num
        row[@letter] = "X"
      end
    end
  end

  def show_board
    puts "[B   I   N   G   O]"
    @bingo_board.each do |row|
      p row
    end
    puts
  end

  def show_legal
    puts "[B   I   N   G   O]"
    @legal_board.each do |row|
      p row
    end
    puts
  end

end

#DRIVER CODE (I.E. METHOD CALLS) GO BELOW THIS LINE
board = [[47, 44, 71, 8, 88],
        [22, 69, 75, 65, 73],
        [83, 85, 97, 89, 57],
        [25, 31, 96, 68, 51],
        [75, 70, 54, 80, 83]]

new_game = BingoBoard.new(board)
new_game.show_board
# repeat these three until game win,(copy paste a bunch below, although we could loop it until some condition)
new_game.num_and_letter
new_game.check_board
new_game.show_board

two_game = BingoBoard.new(board)
two_game.create_board
two_game.show_legal

#Reflection
=begin

•How difficult was pseudocoding this challenge? What do you think of your pseudocoding style?

It was pretty difficult this time around, but not for
technical reasons.  The 'pseudocode' given at the top
was way too distracting for me to write better
psuedocode.  Besides the distraction though, I think I
still need to work on going through each small step.

•What are the benefits of using a class for this challenge?

You could create multiple bingo boards and compare them
all to one letter number combo.  Creating your own bingo
hall, essentialy.

•How can you access coordinates in a nested array?

array[index][sub_index]..etc.  As deep as you want to make it technically.

•What methods did you use to access and modify the array?

I used #each and #delete_at mostly.  Otherwise, to replace data with an 'x' I
just reassigned the value at that index

•Give an example of a new method you learned while reviewing the Ruby docs.
  Based on what you see in the docs, what purpose does it serve, and how is it called?

#delete_at(1) would delete the value at index one of the array it was called on.
that is it's purpose, it doesn't replace with nil or anything like that, it just
removes it from your array.  It is called like as : array.delete_at(index)

•How did you determine what should be an instance variable versus a local variable?

Anything I needed to use outside of the method it was defined in, I made an instance
Everything else I made local.

•What do you feel is most improved in your refactored solution?

I didn't feel like there was anything to improve.  I looked at a couple methods
like @map! , but they wouldn't have simplified the code nor would they have made
it easier to read.  I thought about the ternary, but it doesn't really make sense
to use in this code (at least the way I set it up).

So I'd have to say that most imporoved goes to the optional release that I completed
since it wasn't in my initial solution!

=end


text:
categories:
- tumblr
- archive
- video
date: 2007-09-18T08:44:06Z
title: Video 20070918
url: /2007/09/18/video-20070918/
---

Television - Marquee Moon 2007


text:
package me.savikin.kris.common.blocks.te;

import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ITickable;

/**
 * Created by Mark on 26/06/2016.
 */

public class TileEntityAirPump extends TileEntity implements ITickable
{
    public Double pressure;
    public float baseVolume = 2;
    public int baseCapacity = 2;
    public float finalCapacity;
    public float finalVolume;
    public float pressureMultiplier = 1;
    public float volumeModifier = 1;

    public float getCapacity()
    {
        finalCapacity = baseCapacity * pressureMultiplier;
        System.out.println(finalCapacity);
        return finalCapacity;
    }

    public float checkCapacity()
    {
        return finalCapacity;
    }

    public float checkVolume()
    {
        return finalVolume;
    }

    public float getVolume()
    {
        finalVolume = baseVolume * volumeModifier;
        System.out.println(finalVolume);
        return finalVolume;
    }

    public void checkPressure()
    {
        if (pressure != null) {
            if (pressure >= finalCapacity) {
                // Does action related to pressure overload
                this.worldObj.createExplosion(null, this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 2f, false);
            }
        }
        else
        {
            System.out.println("Pressure is equal to null.");
        }
    }

    @Override
    public void update()
    {
        checkCapacity();
        checkVolume();
    }
}


text:
* Update OTel SDK version to `1.3.1`.
  ([#637](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/637))
* Remove .NET Framework 4.6.1. The minimum .NET Framework version supported is
  .NET Framework 4.6.2 (by .NET Standard 2.0).
  ([#637](https://github.com/open-telemetry/opentelemetry-dotnet/issues/637))

## 1.0.0-beta.3

* Going forward the NuGet package will be
  [`OpenTelemetry.Instrumentation.MassTransit`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.MassTransit).
  Older versions will remain at
  [`OpenTelemetry.Contrib.Instrumentation.MassTransit`](https://www.nuget.org/packages/OpenTelemetry.Contrib.Instrumentation.MassTransit)
  [(#252)](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/252)

  Migration:

  * In code update namespaces (eg `using
    OpenTelemetry.Contrib.Instrumentation.MassTransit` -> `using
    OpenTelemetry.Instrumentation.MassTransit`)

## 1.0.0-beta2

Released 2021-June-17

* Updated OTel SDK package version to 1.1.0-beta4
  ([#136](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/136))

## Initial Release

* Updated OTel SDK package version to 1.1.0-beta1
  ([#100](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/100))


text:
package org.ops4j.pax.wicket.it.samples.karaf;

import java.io.BufferedReader;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;

import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.inject.Inject;
import org.apache.karaf.features.BootFinished;

import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.provision;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.configureConsole;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;

import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel;
import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
import org.ops4j.pax.exam.options.MavenUrlReference;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;
import org.ops4j.pax.wicket.samples.plain.simple.service.EchoService;
import org.osgi.framework.BundleContext;

import static shaded.org.apache.http.HttpHeaders.USER_AGENT;
import static org.junit.Assert.assertTrue;
import static org.ops4j.pax.exam.CoreOptions.maven;
import org.ops4j.pax.exam.karaf.options.KarafDistributionOption;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.logLevel;

@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class SampleWebUiTestNoSpring {

    /**
     * WebApplicationFactory of the some of the applications we started. We
     * don't use these members, except for synchronizing the test. Injecting
     * them guarantees that the services are available before our test runs. The
     * timeouts are rather high for the benefit of our CI server.
     */
    protected static final String WEBUI_PORT = "8181";
    protected static final String LOG_LEVEL = "WARN";
    protected static final String SYMBOLIC_NAME_PAX_WICKET_SERVICE = "org.ops4j.pax.wicket.service";

    private static final int TIMEOUT = 120 * 1000;

    @Inject
    private BootFinished bootFinished;
    @Inject
    private BundleContext bundleContext;

    //    @Inject
//    @Filter(value = "(pax.wicket.applicationname=edge.inheritinjection)", timeout = TIMEOUT)
//    private WebApplicationFactory<WebApplication> factoryEdgeInheritInjection;
//
//    @Inject
//    @Filter(value = "(pax.wicket.applicationname=springdm.simple.default)", timeout = TIMEOUT)
//    private WebApplicationFactory<WebApplication> factorySpringDmSimpleDefault;
//    @Inject
//    @Filter(value = "(pax.wicket.applicationname=sample.ds.factory)", timeout = TIMEOUT)
//    private WebApplicationFactory<WebApplication> factorySampleDS;
    @Configuration
    public final Option[] configureAdditionalProvision() {

        MavenUrlReference wicketFeatureRepo = maven()
                .groupId("org.ops4j.pax.wicket").artifactId("paxwicket")
                .classifier("features").type("xml").versionAsInProject();

        MavenUrlReference paxwicketFeatureRepo = maven()
                .groupId("org.ops4j.pax.wicket").artifactId("features")
                .classifier("features").type("xml").versionAsInProject();
        MavenUrlReference karafSampleFeatureRepo = maven()
                .groupId("org.ops4j.pax.wicket.samples").artifactId("features")
                .classifier("features").type("xml").versionAsInProject();
        MavenUrlReference karafStandardRepo = maven()
                .groupId("org.apache.karaf.features").artifactId("standard").versionAsInProject().classifier("features").type("xml");

        MavenArtifactUrlReference karafUrl = maven()
                .groupId("org.apache.karaf").artifactId("apache-karaf")
                .type("zip").versionAsInProject();

        return new Option[]{
                KarafDistributionOption.debugConfiguration("5005", false),
                karafDistributionConfiguration()
                        .frameworkUrl(karafUrl)
                        .unpackDirectory(new File("target", "exam"))
                        .useDeployFolder(false),
                keepRuntimeFolder(),
                configureConsole().ignoreLocalConsole(), logLevel(LogLevel.ERROR),
                features(karafStandardRepo, "scr"),
                features(karafStandardRepo, "webconsole"),
                provision(mavenBundle().groupId("org.slf4j").artifactId("slf4j-simple").versionAsInProject().start(false)),
                features(wicketFeatureRepo, "wicket"),
                features(paxwicketFeatureRepo, "pax-wicket"),
                features(paxwicketFeatureRepo, "pax-wicket-blueprint"),
                features(karafSampleFeatureRepo, "wicket-samples-base"),
                features(karafSampleFeatureRepo, "wicket-samples-plain-simple"),
                features(karafSampleFeatureRepo, "wicket-samples-plain-pagefactory"),
                features(karafSampleFeatureRepo, "wicket-samples-blueprint-simple"),
                features(karafSampleFeatureRepo, "wicket-samples-blueprint-wicketproperties"),
                features(karafSampleFeatureRepo, "wicket-samples-blueprint-mount"),
                features(karafSampleFeatureRepo, "wicket-samples-blueprint-filter"),
                features(karafSampleFeatureRepo, "wicket-samples-blueprint-applicationfactory"),
                features(karafSampleFeatureRepo, "wicket-samples-blueprint-injection-simple")
        };
    }

    @Test()
    public void allFactoriesPresent() throws Exception {

//        assertNotNull(factorySpringDmSimpleDefault);
//        assertNotNull(factoryEdgeInheritInjection);
//        assertNotNull(factorySampleDS);
    }

    @Test
    public void testNavigationApplicationShouldRender() throws Exception {

        String page = sendGet("http://localhost:" + WEBUI_PORT + "/navigation/");
        assertTrue(page.contains("Homepage linking all OPS4J samples"));
    }

    @Test
    public void testSamplePlainSimpleShouldRenderPage() throws Exception {
        String page = sendGet("http://localhost:" + WEBUI_PORT + "/plain/simple/");
        assertTrue(page.contains("Welcome to the most simple pax-wicket application"));
    }

    @Test
    public void testSamplePlainPageFactoryShouldAllowLink() throws Exception {
        String page = sendGet("http://localhost:" + WEBUI_PORT + "/plain/pagefactory/");
        assertTrue(page.contains("Welcome to the most simple pax-wicket application"));

    }

    @Test
    public void checkInjectedPage() throws Exception {
        //Register a service here for later injection

        bundleContext.registerService(EchoService.class, new EchoServiceImplementation(), null);

        String page = sendGet("http://localhost:" + WEBUI_PORT + "/plain/inject/");
        assertTrue("/plain/inject/ failed to start properly", page.contains("Echo: Welcome to the most simple pax-wicket application"));

    }

    public void testSampleBlueprintSimpleDefaultShouldRenderPage() throws Exception {
        String page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/simple/default");
        assertTrue(page.contains("Welcome to the most simple pax-wicket application based on blueprint"));
    }

    @Test
    public void testSampleBlueprintSimplePaxwicketShouldRenderPage() throws Exception {

        String page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/simple/paxwicket");
        assertTrue(page.contains("Welcome to the most simple pax-wicket application based on blueprint"));

    }

    @Test
    public void testSampleBlueprintMountPointShouldRenderPage() throws Exception {
        String page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/mount/manuallymounted");
        assertTrue(page.contains("This page is mounted manually."));
        page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/mount/automounted");
        assertTrue(page.contains("This page is automatically mounted."));
        page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/mount/initiallymounted");
        assertTrue(page.contains("This page is mounted initially."));
        page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/mount");
        assertTrue(page.contains("Mountpoint blueprint based sample."));
    }

    @Test
    public void testSampleBlueprintMountPointsToSameApplication() throws Exception {
        String page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/applicationfactory/first");
        assertTrue("contained :" + page, page.contains("This is the 'The first' application home page."));
        page = sendGet("http://localhost:" + WEBUI_PORT + "/blueprint/applicationfactory/second");
        assertTrue("contained :" + page, page.contains("This is the 'The second' application home page."));

    }

    private String sendGet(String url) throws Exception {

        URL obj = new URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();

        // optional default is GET
        con.setRequestMethod("GET");

        //add request header
        con.setRequestProperty("User-Agent", USER_AGENT);

        BufferedReader in = new BufferedReader(
                new InputStreamReader(con.getInputStream()));
        String inputLine;
        StringBuffer response = new StringBuffer();

        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();

        //print result
        return response.toString();

    }

    /**
     * Simple Echo Implementation for itest...
     */
    private final class EchoServiceImplementation implements EchoService {

        private static final long serialVersionUID = 6447679249771482700L;

        public String someEchoMethod(String toEcho) {
            return "Echo: " + toEcho;
        }
    }
}


text:
#include <stdio.h>
#include <math.h>
#include "../include/MeanShift.hpp"

//#define EPSILON 0.0000001
#define EPSILON 0.0001

double euclidean_distance(const Eigen::Vector3d &point_a, const Eigen::Vector3d &point_b){
    double total = 0;
    Eigen::Vector3d tmp = point_a - point_b;

    /*
    for(int i=0; i<point_a.size(); i++){
        total += (point_a[i] - point_b[i]) * (point_a[i] - point_b[i]);
    }
    */
    return tmp.norm();
}

double gaussian_kernel(double distance, double kernel_bandwidth){
    double temp =  exp(-(distance*distance) / (kernel_bandwidth));
    return temp;
}

void MeanShift::set_kernel( double (*_kernel_func)(double,double) ) {
//    if(!_kernel_func){
        kernel_func = gaussian_kernel;
 //   } else {
 //       kernel_func = _kernel_func;
 //   }
}

 Eigen::Vector3d MeanShift::shift_point(const Eigen::Vector3d &point, const vector<Eigen::Vector3d> &points, double kernel_bandwidth) {
    Eigen::Vector3d shifted_point = point;
    for(int dim = 0; dim<shifted_point.size(); dim++){
        shifted_point[dim] = 0;
    }
    double total_weight = 0;
    for(int i=0; i<points.size(); i++){
        Eigen::Vector3d temp_point = points[i];
        double distance = euclidean_distance(point, temp_point);
        double weight = kernel_func(distance, kernel_bandwidth);
        for(int j=0; j<shifted_point.size(); j++){
            shifted_point[j] += temp_point[j] * weight;
        }
        total_weight += weight;
    }

    for(int i=0; i<shifted_point.size(); i++){
        shifted_point[i] /= total_weight;
    }
    return shifted_point;
}

vector<Eigen::Vector3d> MeanShift::cluster(vector<Eigen::Vector3d> points, double kernel_bandwidth){
    vector<bool> stop_moving(points.size(), false);
    stop_moving.reserve(points.size());
    vector<Eigen::Vector3d> shifted_points = points;
    double max_shift_distance;
    do {
        max_shift_distance = 0;
        for(int i=0; i<shifted_points.size(); i++){
            if (!stop_moving[i]) {
                Eigen::Vector3d point_new = shift_point(shifted_points[i], points, kernel_bandwidth);
                double shift_distance = euclidean_distance(point_new, shifted_points[i]);
                if(shift_distance > max_shift_distance){
                    max_shift_distance = shift_distance;
                }
                if(shift_distance <= EPSILON) {
                    stop_moving[i] = true;
                }
                shifted_points[i] = point_new;
            }
        }
        //printf("max_shift_distance: %f\n", max_shift_distance);
    } while (max_shift_distance > EPSILON);
    return shifted_points;
}


text:
/**
 * Default configurations
 */

export default {
  home: process.env.FBRS_HOME || process.env.HOME,
  ip: process.env.FBRS_IP || "127.0.0.1",
  port: Number(process.env.FBRS_PORT) || 9432,
  adapter: process.env.FBRS_ADAPTER || "sails-disk",
  adapterConfig: {},
};


text:
{% from 'forms/_form.html' import simple_form, form_fieldset, form_rows %}

{% set has_other_fields = (form.organizer_info or form.additional_info) | bool %}
{% call simple_form(form, back=_('Cancel'), footer_align_right=true) %}
    {{ form_rows(form, fields=('organizer_info', 'additional_info')) }}
    {% call form_fieldset(_('Contact/Support'), render_as_fieldset=has_other_fields) %}
        {{ form_rows(form, fields=form._contact_fields) }}
    {% endcall %}
{% endcall %}


text:
module FastlaneCore
  class AnalyticsIngesterClient
    def post_events(events)
      unless Helper.test?
        fork do
          send_request(json: { analytics: events }.to_json)
        end
      end
      return true
    end

    def send_request(json: nil, retries: 2)
      post_request(body: json)
    rescue
      retries -= 1
      retry if retries >= 0
    end

    def post_request(body: nil)
      if ENV['METRICS_DEBUG']
        write_json(body)
      end
      url = ENV["FASTLANE_METRICS_URL"] || "https://fastlane-metrics.fabric.io"

      require 'faraday'
      connection = Faraday.new(url) do |conn|
        conn.adapter Faraday.default_adapter
        if ENV['METRICS_DEBUG']
          conn.proxy = "https://127.0.0.1:8888"
          conn.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
        end
      end
      connection.post do |req|
        req.url '/public'
        req.headers['Content-Type'] = 'application/json'
        req.body = body
      end
    end

    # This method is only for debugging purposes
    def write_json(body)
      File.write("#{ENV['HOME']}/Desktop/mock_analytics-#{Time.now.to_i}.json", body)
    end
  end
end


text:
async_test(function(t) {
    var xhr = new XMLHttpRequest();
    xhr.onload = function () {
        t.step(function () { assert_true(xhr.status === 404); t.done(); });
    };
    // Send a request that returns 200 if and only if CSP header is present.
    xhr.open(
        "GET",
        "http://127.0.0.1:8000/security/contentSecurityPolicy/resources/test-csp-header.pl",
        true
    );
    xhr.send();
}, 'CSP header is not sent on resource requests for which there is no policy.');

test(function() {
    assert_true(typeof(script_loaded) === "undefined");
}, 'CSP header is not sent on resource requests for which there is a policy.');


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

    <string name="app_name">P音乐</string>
    <string name="action_settings">Settings</string>
    <string name="hello_world">听音乐</string>
    <string name="LyricShow">歌词无</string>
    <string name="music_name">OOO</string>
    <string name="music_artist">XXX</string>
    <string name="music_loop">music_loop</string>
    <string name="music_random">music_random</string>
    <string name="music_start_time">00:00</string>
    <string name="music_end_time">00:00</string>
    <string name="music_lasted">music_lasted</string>
    <string name="music_rewind">music_rewind</string>
    <string name="music_play">music_play</string>
    <string name="music_foward">music_forward</string>
    <string name="music_next">music_next</string>
    <string name="music_item_image">music_item_image</string>
	<string name="music_item_time">03:42</string>

</resources>


text:
import * as types from 'constants/PublicWatchListActionTypes';
import { WATCHLISTS_ENDPOINT } from 'constants/Endpoints';
import { authenticatedFetch } from 'utils/api';

export function getPublicWatchLists() {
	return (dispatch, getState) => {
		authenticatedFetch(`${WATCHLISTS_ENDPOINT}/shared`, getState)
			.then(json => dispatch(updatePublicWatchLists(json.watch_lists)));
	}
}

export function updatePublicWatchLists(watchLists) {
  return { type: types.UPDATE_LISTS, watchLists };
}


text:
<?php

namespace Enzyme\Loopy;

class InvalidLoopException extends \Exception
{
    // Just an empty extension of the standard Exception class.
}


text:
var http = require('http')
var server = http.createServer(handler)
var port = server.port = process.env.PORT || 1337
var assert = require('assert')
server.listen(port)

module.exports = server

server._expect = {}

function handler (req, res) {
  req.connection.setTimeout(1000)

  // If we got authorization, make sure it's the right password.
  if (req.headers.authorization && req.headers.authorization.match(/^Basic/)) {
    var auth = req.headers.authorization.replace(/^Basic /, '')
    auth = new Buffer(auth, 'base64').toString('utf8')
    assert.equal(auth, 'username:%1234@asdf%')
  }

  var u = '* ' + req.url
  var mu = req.method + ' ' + req.url

  var k = server._expect[mu] ? mu : server._expect[u] ? u : null
  if (!k) throw Error('unexpected request: ' + req.method + ' ' + req.url)

  var fn = server._expect[k].shift()
  if (!fn) throw Error('unexpected request: ' + req.method + ' ' + req.url)

  this.log.info('fake-registry', Object.keys(server._expect).map(function (k) {
    return [k, server._expect[k].length]
  }).reduce(function (acc, kv) {
    acc[kv[0]] = kv[1]
    return acc
  }, {}))

  res.json = json
  fn(req, res)
}

function json (o) {
  this.setHeader('content-type', 'application/json')
  this.end(JSON.stringify(o))
}

// this log is meanto to be overridden
server.log = require('npmlog')

server.expect = function (method, u, fn) {
  if (typeof u === 'function') {
    fn = u
    u = method
    method = '*'
  }
  u = method + ' ' + u
  server._expect[u] = server._expect[u] || []
  server._expect[u].push(fn)
}


text:
Article 357
----
L'adoption confère à l'enfant le nom de l'adoptant.

En cas d'adoption de l'enfant du conjoint ou d'adoption d'un enfant par deux
époux, l'adoptant et son conjoint ou les adoptants choisissent, par déclaration
conjointe, le nom de famille dévolu à l'enfant : soit le nom de l'un d'eux, soit
leurs deux noms accolés dans l'ordre choisi par eux, dans la limite d'un nom de
famille pour chacun d'eux.

Cette faculté de choix ne peut être exercée qu'une seule fois.

En l'absence de déclaration conjointe mentionnant le choix de nom de l'enfant,
celui-ci prend le nom de l'adoptant et de son conjoint ou de chacun des deux
adoptants, dans la limite du premier nom de famille pour chacun d'eux, accolés
selon l'ordre alphabétique.

Lorsqu'il a été fait application de l'article 311-21, du deuxième alinéa de
l'article 311-23 ou du présent article à l'égard d'un enfant commun, le nom
précédemment dévolu ou choisi vaut pour l'adopté.

Lorsque les adoptants ou l'un d'entre eux portent un double nom de famille, ils
peuvent, par une déclaration écrite conjointe, ne transmettre qu'un seul nom à
l'adopté.

Sur la demande du ou des adoptants, le tribunal peut modifier les prénoms de
l'enfant.


text:
class AddIndiceToTables < ActiveRecord::Migration
  def change
    add_index :questions, :quiz_id
    add_index :answers, :user_id
    add_index :choices, :question_id
  end
end


text:
SYNONYM

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

#### Published in
Syll. fung. (Abellini) 1: 742 (1882)

#### Original name
Valsa cincta (Fr.) Fr., 1849

### Remarks
null


text:
CREATE TABLE IF NOT EXISTS activities (
  id varchar(255) PRIMARY KEY,
  name VARCHAR(255),
  type VARCHAR(255),
  asxml xml
);

INSERT INTO db_version
  (version, app, description, created)
values(
  '0.4.0',
  'strolch',
  'Added new table activities',
  CURRENT_TIMESTAMP
);


text:
from tacker.sol_refactored.objects import base
from tacker.sol_refactored.objects import fields

# NFV-SOL 003
# - v3.3.1 5.5.3.2 (API version: 2.0.0)
@base.TackerObjectRegistry.register
class ExtVirtualLinkInfoV2(base.TackerObject, base.TackerObjectDictCompat):

    # Version 1.0: Initial version
    VERSION = '1.0'

    fields = {
        'id': fields.StringField(nullable=False),
        'resourceHandle': fields.ObjectField(
            'ResourceHandle', nullable=False),
        'extLinkPorts': fields.ListOfObjectsField(
            'ExtLinkPortInfoV2', nullable=True),
        'currentVnfExtCpData': fields.ListOfObjectsField(
            'VnfExtCpData', nullable=False),
    }


text:
@interface QMChatCellLayoutAttributes : UICollectionViewLayoutAttributes <NSCopying>

@property (assign, nonatomic) UIEdgeInsets containerInsets;
@property (assign, nonatomic) CGSize containerSize;
@property (assign, nonatomic) CGSize avatarSize;
@property (assign, nonatomic) CGFloat topLabelHeight;
@property (assign, nonatomic) CGFloat bottomLabelHeight;
@property (assign, nonatomic) CGFloat spaceBetweenTopLabelAndTextView;
@property (assign, nonatomic) CGFloat spaceBetweenTextViewAndBottomLabel;

@end