text:
#pragma once
#include <aws/kendra/Kendra_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/kendra/model/ConfluenceSpaceToIndexFieldMapping.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace kendra
{
namespace Model
{

  /**
   *
Specifies the configuration for indexing Confluence spaces.

See
   * Also:
   AWS
   * API Reference

   */
  class AWS_KENDRA_API ConfluenceSpaceConfiguration
  {
  public:
    ConfluenceSpaceConfiguration();
    ConfluenceSpaceConfiguration(Aws::Utils::Json::JsonView jsonValue);
    ConfluenceSpaceConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
Specifies whether Amazon Kendra should index personal spaces. Users can add
     * restrictions to items in personal spaces. If personal spaces are indexed,
     * queries without user context information may return restricted items from a
     * personal space in their results. For more information, see Filtering
     * on user context.

     */
    inline bool GetCrawlPersonalSpaces() const{ return m_crawlPersonalSpaces; }

    /**
     *
Specifies whether Amazon Kendra should index personal spaces. Users can add
     * restrictions to items in personal spaces. If personal spaces are indexed,
     * queries without user context information may return restricted items from a
     * personal space in their results. For more information, see Filtering
     * on user context.

     */
    inline bool CrawlPersonalSpacesHasBeenSet() const { return m_crawlPersonalSpacesHasBeenSet; }

    /**
     *
Specifies whether Amazon Kendra should index personal spaces. Users can add
     * restrictions to items in personal spaces. If personal spaces are indexed,
     * queries without user context information may return restricted items from a
     * personal space in their results. For more information, see Filtering
     * on user context.

     */
    inline void SetCrawlPersonalSpaces(bool value) { m_crawlPersonalSpacesHasBeenSet = true; m_crawlPersonalSpaces = value; }

    /**
     *
Specifies whether Amazon Kendra should index personal spaces. Users can add
     * restrictions to items in personal spaces. If personal spaces are indexed,
     * queries without user context information may return restricted items from a
     * personal space in their results. For more information, see Filtering
     * on user context.

     */
    inline ConfluenceSpaceConfiguration& WithCrawlPersonalSpaces(bool value) { SetCrawlPersonalSpaces(value); return *this;}

    /**
     *
Specifies whether Amazon Kendra should index archived spaces.

     */
    inline bool GetCrawlArchivedSpaces() const{ return m_crawlArchivedSpaces; }

    /**
     *
Specifies whether Amazon Kendra should index archived spaces.

     */
    inline bool CrawlArchivedSpacesHasBeenSet() const { return m_crawlArchivedSpacesHasBeenSet; }

    /**
     *
Specifies whether Amazon Kendra should index archived spaces.

     */
    inline void SetCrawlArchivedSpaces(bool value) { m_crawlArchivedSpacesHasBeenSet = true; m_crawlArchivedSpaces = value; }

    /**
     *
Specifies whether Amazon Kendra should index archived spaces.

     */
    inline ConfluenceSpaceConfiguration& WithCrawlArchivedSpaces(bool value) { SetCrawlArchivedSpaces(value); return *this;}

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline const Aws::Vector<Aws::String>& GetIncludeSpaces() const{ return m_includeSpaces; }

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline bool IncludeSpacesHasBeenSet() const { return m_includeSpacesHasBeenSet; }

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline void SetIncludeSpaces(const Aws::Vector<Aws::String>& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces = value; }

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline void SetIncludeSpaces(Aws::Vector<Aws::String>&& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces = std::move(value); }

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline ConfluenceSpaceConfiguration& WithIncludeSpaces(const Aws::Vector<Aws::String>& value) { SetIncludeSpaces(value); return *this;}

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline ConfluenceSpaceConfiguration& WithIncludeSpaces(Aws::Vector<Aws::String>&& value) { SetIncludeSpaces(std::move(value)); return *this;}

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline ConfluenceSpaceConfiguration& AddIncludeSpaces(const Aws::String& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces.push_back(value); return *this; }

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline ConfluenceSpaceConfiguration& AddIncludeSpaces(Aws::String&& value) { m_includeSpacesHasBeenSet = true; m_includeSpaces.push_back(std::move(value)); return *this; }

    /**
     *
A list of space keys for Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are indexed. Spaces that aren't in the
     * list aren't indexed. A space in the list must exist. Otherwise, Amazon Kendra
     * logs an error when the data source is synchronized. If a space is in both the
     * IncludeSpaces and the ExcludeSpaces list, the space is
     * excluded.

     */
    inline ConfluenceSpaceConfiguration& AddIncludeSpaces(const char* value) { m_includeSpacesHasBeenSet = true; m_includeSpaces.push_back(value); return *this; }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline const Aws::Vector<Aws::String>& GetExcludeSpaces() const{ return m_excludeSpaces; }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline bool ExcludeSpacesHasBeenSet() const { return m_excludeSpacesHasBeenSet; }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline void SetExcludeSpaces(const Aws::Vector<Aws::String>& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces = value; }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline void SetExcludeSpaces(Aws::Vector<Aws::String>&& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces = std::move(value); }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline ConfluenceSpaceConfiguration& WithExcludeSpaces(const Aws::Vector<Aws::String>& value) { SetExcludeSpaces(value); return *this;}

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline ConfluenceSpaceConfiguration& WithExcludeSpaces(Aws::Vector<Aws::String>&& value) { SetExcludeSpaces(std::move(value)); return *this;}

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline ConfluenceSpaceConfiguration& AddExcludeSpaces(const Aws::String& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces.push_back(value); return *this; }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline ConfluenceSpaceConfiguration& AddExcludeSpaces(Aws::String&& value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces.push_back(std::move(value)); return *this; }

    /**
     *
A list of space keys of Confluence spaces. If you include a key, the blogs,
     * documents, and attachments in the space are not indexed. If a space is in both
     * the ExcludeSpaces and the IncludeSpaces list, the
     * space is excluded.

     */
    inline ConfluenceSpaceConfiguration& AddExcludeSpaces(const char* value) { m_excludeSpacesHasBeenSet = true; m_excludeSpaces.push_back(value); return *this; }

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline const Aws::Vector<ConfluenceSpaceToIndexFieldMapping>& GetSpaceFieldMappings() const{ return m_spaceFieldMappings; }

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline bool SpaceFieldMappingsHasBeenSet() const { return m_spaceFieldMappingsHasBeenSet; }

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline void SetSpaceFieldMappings(const Aws::Vector<ConfluenceSpaceToIndexFieldMapping>& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings = value; }

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline void SetSpaceFieldMappings(Aws::Vector<ConfluenceSpaceToIndexFieldMapping>&& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings = std::move(value); }

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline ConfluenceSpaceConfiguration& WithSpaceFieldMappings(const Aws::Vector<ConfluenceSpaceToIndexFieldMapping>& value) { SetSpaceFieldMappings(value); return *this;}

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline ConfluenceSpaceConfiguration& WithSpaceFieldMappings(Aws::Vector<ConfluenceSpaceToIndexFieldMapping>&& value) { SetSpaceFieldMappings(std::move(value)); return *this;}

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline ConfluenceSpaceConfiguration& AddSpaceFieldMappings(const ConfluenceSpaceToIndexFieldMapping& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings.push_back(value); return *this; }

    /**
     *
Defines how space metadata fields should be mapped to index fields. Before
     * you can map a field, you must first create an index field with a matching type
     * using the console or the UpdateIndex operation.

If you
     * specify the SpaceFieldMappings parameter, you must specify at least
     * one field mapping.

     */
    inline ConfluenceSpaceConfiguration& AddSpaceFieldMappings(ConfluenceSpaceToIndexFieldMapping&& value) { m_spaceFieldMappingsHasBeenSet = true; m_spaceFieldMappings.push_back(std::move(value)); return *this; }

  private:

    bool m_crawlPersonalSpaces;
    bool m_crawlPersonalSpacesHasBeenSet;

    bool m_crawlArchivedSpaces;
    bool m_crawlArchivedSpacesHasBeenSet;

    Aws::Vector<Aws::String> m_includeSpaces;
    bool m_includeSpacesHasBeenSet;

    Aws::Vector<Aws::String> m_excludeSpaces;
    bool m_excludeSpacesHasBeenSet;

    Aws::Vector<ConfluenceSpaceToIndexFieldMapping> m_spaceFieldMappings;
    bool m_spaceFieldMappingsHasBeenSet;
  };

} // namespace Model
} // namespace kendra
} // namespace Aws


text:
(function($){
  var toTop = $('#toTop').length ? $('#toTop').offset().top - $(window).height() + 20 : 0;

  // Share
  $('body').on('click', function(){
    $('.article-share-box.on').removeClass('on');
  }).on('click', '.article-share-link', function(e){
    e.stopPropagation();

    var $this = $(this),
      url = $this.attr('data-url'),
      encodedUrl = encodeURIComponent(url),
      id = 'article-share-box-' + $this.attr('data-id'),
      offset = $this.offset();

    if ($('#' + id).length){
      var box = $('#' + id);

      if (box.hasClass('on')){
        box.removeClass('on');
        return;
      }
    } else {
      var html = [
        '
',
          '<input class="article-share-input" value="' + url + '">',
          '
',
            '',
            '',
            '',
            '',
          '
',
        '
'
      ].join('');

      var box = $(html);

      $('body').append(box);
    }

    $('.article-share-box.on').hide();

    box.css({
      top: offset.top + 25,
      left: offset.left
    }).addClass('on');
  }).on('click', '.article-share-box', function(e){
    e.stopPropagation();
  }).on('click', '.article-share-box-input', function(){
    $(this).select();
  }).on('click', '.article-share-box-link', function(e){
    e.preventDefault();
    e.stopPropagation();

    window.open(this.href, 'article-share-box-window-' + Date.now(), 'width=500,height=450');
  });

  // Caption
  $('.article-entry').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;

      var alt = this.alt;

      if (alt) $(this).after('' + alt + '');

      $(this).wrap('');
    });

    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });

  if ($.fancybox){
    $('.fancybox').fancybox();
  }

  // Profile card
  $(document).on('click', function () {
    $('#profile').removeClass('card');
  }).on('click', '#profile-anchor', function (e) {
    e.stopPropagation();
    $('#profile').toggleClass('card');
  }).on('click', '.profile-inner', function (e) {
    e.stopPropagation();
  });

  // To Top
  //$(document).on('scroll', function () {
  //  if ($(document).width() >= 800) {
  //    if($(this).scrollTop() > toTop) {
  //      $('#toTop').addClass('fix');
  //      $('#toTop').css('left', $('#sidebar').offset().left);
  //    } else {
  //      $('#toTop').removeClass('fix');
  //    }
  //  } else {
  //    $('#toTop').addClass('fix');
  //    $('#toTop').css('right', 20);
  //  }
  //}).on('click', '#toTop', function () {
  //  $(document).scrollTop(0);
  //});
//hotkeys
$(function() {
  var firstmove = true;
  $(document).bind('keydown', 'j', function(){
    if (firstmove) { firstmove = false; $('#firstmove').focus(); return; }
    $(".move:focus").closest('li').next().find('a.move').focus();
  })
  $(document).bind('keydown', 'k', function(){
    if (firstmove) { firstmove = false; $('#firstmove').focus(); return; }
    $(".move:focus").closest('li').prev().find('a.move').focus();
  })
    $(document).bind('keydown', 'ctrl+[', function(){
        document.location.href = '/';
    })
  $('.move').click(function() {
    this.focus();
  });
});

})(jQuery);

redpajama_set_name: RedPajamaGithub


text:
import defineFilterUGen from "./_defineFilterUGen";

export default defineFilterUGen("AllpassL", [
  [ "maxDelayTime", 0.2 ],
  [ "delayTime"   , 0.2 ],
  [ "decayTime"   , 1   ],
]);


text:
package de.vogella.plugin.htmlconverter.handler;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;

public final class ConvertHandler extends AbstractHandler {
	private static final QualifiedName HTML_PATH_PERSISTENT_PROPERTY_NAME = new QualifiedName("html",
			"path");

	@Override
	public Object execute(final ExecutionEvent event) throws ExecutionException {
		final Shell shell = HandlerUtil.getActiveShell(event);
		final ISelection sel = HandlerUtil.getActiveMenuSelection(event);

		if (!(sel instanceof IStructuredSelection))
			throw new ExecutionException("invalid selection");

		final IStructuredSelection selection = (IStructuredSelection) sel;

		final Object firstElement = selection.getFirstElement();
		if (firstElement instanceof ICompilationUnit) {
			final ICompilationUnit cu = (ICompilationUnit) firstElement;
			String directory = getPersistentProperty(cu.getResource(),
					HTML_PATH_PERSISTENT_PROPERTY_NAME);

			if (directory != null && directory.length() > 0) {
				if (MessageDialog.openQuestion(shell, "Question",
						"Use the previous output directory?")) {
				} else {
					directory = new DirectoryDialog(shell).open();
				}
			}
			if (directory != null && directory.length() > 0) {
				setPersistentProperty(cu.getResource(), HTML_PATH_PERSISTENT_PROPERTY_NAME, directory);
				write(directory, cu);
			}

		} else {
			MessageDialog.openInformation(shell, "Info",
					"Please select a Java source file");
		}
		return null;
	}

	protected String getPersistentProperty(IResource res, QualifiedName qn) {
		try {
			return res.getPersistentProperty(qn);
		} catch (CoreException e) {
			return "";
		}
	}

	protected void setPersistentProperty(IResource res, QualifiedName qn,
			String value) {
		try {
			res.setPersistentProperty(qn, value);
		} catch (CoreException e) {
			e.printStackTrace();
		}
	}

	private void write(String dir, ICompilationUnit cu) {
		BufferedWriter writer = null;
		try {
			String test = cu.getCorrespondingResource().getName();
			// Need
			String[] name = test.split("\\.");
			String htmlFile = dir + "\\" + name[0] + ".html";
			FileWriter output = new FileWriter(htmlFile);
			writer = new BufferedWriter(output);
			writer.write("");
			writer.write("");
			writer.write("");
			writer.write("");
			writer.write("
");
			writer.write(cu.getSource());
			writer.write("
");
			writer.write("");
			writer.write("");
		} catch (JavaModelException e) {
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (null != writer) {
				try {
					writer.close();
				} catch (IOException e) {
				}
			}
		}
	}
}


text:
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.Compute.Models
{
    public partial class VirtualMachineScaleSetNetworkProfile : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            if (HealthProbe != null)
            {
                writer.WritePropertyName("healthProbe");
                writer.WriteObjectValue(HealthProbe);
            }
            if (NetworkInterfaceConfigurations != null)
            {
                writer.WritePropertyName("networkInterfaceConfigurations");
                writer.WriteStartArray();
                foreach (var item in NetworkInterfaceConfigurations)
                {
                    writer.WriteObjectValue(item);
                }
                writer.WriteEndArray();
            }
            writer.WriteEndObject();
        }

        internal static VirtualMachineScaleSetNetworkProfile DeserializeVirtualMachineScaleSetNetworkProfile(JsonElement element)
        {
            ApiEntityReference healthProbe = default;
            IList<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigurations = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("healthProbe"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    healthProbe = ApiEntityReference.DeserializeApiEntityReference(property.Value);
                    continue;
                }
                if (property.NameEquals("networkInterfaceConfigurations"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List<VirtualMachineScaleSetNetworkConfiguration> array = new List<VirtualMachineScaleSetNetworkConfiguration>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(VirtualMachineScaleSetNetworkConfiguration.DeserializeVirtualMachineScaleSetNetworkConfiguration(item));
                        }
                    }
                    networkInterfaceConfigurations = array;
                    continue;
                }
            }
            return new VirtualMachineScaleSetNetworkProfile(healthProbe, networkInterfaceConfigurations);
        }
    }
}


text:
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.camunda.bpm.engine.rest.history;

import java.util.List;

import org.camunda.bpm.engine.rest.dto.history.HistoricCaseActivityStatisticsDto;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

/**
 * @author Roman Smirnov
 *
 */
@Path(HistoricCaseActivityStatisticsRestService.PATH)
@Produces(MediaType.APPLICATION_JSON)
public interface HistoricCaseActivityStatisticsRestService {

  public static final String PATH = "/case-definition/{id}/statistics";

  @GET
  @Produces(MediaType.APPLICATION_JSON)
  public List<HistoricCaseActivityStatisticsDto> getHistoricCaseActivityStatistics(@PathParam("id") String caseDefinitionId);

}


text:
from numpy import sin, cos, deg2rad, transpose, dot, arcsin, arctan2, zeros,\
                  ndarray, array, rad2deg, pi
from premat import premat

def precess(ra0, dec0, equinox1, equinox2, fk4=False, radian=False):
#   '''NAME:
#         PRECESS
#    PURPOSE:
#         Precess coordinates from EQUINOX1 to EQUINOX2.
#    EXPLANATION:
#         For interactive display, one can use the procedure ASTRO which calls
#         PRECESS or use the /PRINT keyword.   The default (RA,DEC) system is
#         FK5 based on epoch J2000.0 but FK4 based on B1950.0 is available via
#         the /FK4 keyword.
#
#         Use BPRECESS and JPRECESS to convert between FK4 and FK5 systems
#    CALLING SEQUENCE:
#         PRECESS, ra, dec, [ equinox1, equinox2, /PRINT, /FK4, /RADIAN ]
#
#    INPUT - OUTPUT:
#         RA - Input right ascension (scalar or vector) in DEGREES, unless the
#                 /RADIAN keyword is set
#         DEC - Input declination in DEGREES (scalar or vector), unless the
#                 /RADIAN keyword is set
#
#         The input RA and DEC are modified by PRECESS to give the
#         values after precession.
#
#    OPTIONAL INPUTS:
#         EQUINOX1 - Original equinox of coordinates, numeric scalar.  If
#                  omitted, then PRECESS will query for EQUINOX1 and EQUINOX2.
#         EQUINOX2 - Equinox of precessed coordinates.
#
#    OPTIONAL INPUT KEYWORDS:
#         /PRINT - If this keyword is set and non-zero, then the precessed
#                  coordinates are displayed at the terminal.    Cannot be used
#                  with the /RADIAN keyword
#         /FK4   - If this keyword is set and non-zero, the FK4 (B1950.0) system
#                  will be used otherwise FK5 (J2000.0) will be used instead.
#         /RADIAN - If this keyword is set and non-zero, then the input and
#                  output RA and DEC vectors are in radians rather than degrees
#
#    RESTRICTIONS:
#          Accuracy of precession decreases for declination values near 90
#          degrees.  PRECESS should not be used more than 2.5 centuries from
#          2000 on the FK5 system (1950.0 on the FK4 system).
#
#    EXAMPLES:
#          (1) The Pole Star has J2000.0 coordinates (2h, 31m, 46.3s,
#                  89d 15' 50.6"); compute its coordinates at J1985.0
#
#          IDL> precess, ten(2,31,46.3)*15, ten(89,15,50.6), 2000, 1985, /PRINT
#
#                  ====> 2h 16m 22.73s, 89d 11' 47.3"
#
#          (2) Precess the B1950 coordinates of Eps Ind (RA = 21h 59m,33.053s,
#          DEC = (-56d, 59', 33.053") to equinox B1975.
#
#          IDL> ra = ten(21, 59, 33.053)*15
#          IDL> dec = ten(-56, 59, 33.053)
#          IDL> precess, ra, dec ,1950, 1975, /fk4
#
#    PROCEDURE:
#          Algorithm from Computational Spherical Astronomy by Taff (1983),
#          p. 24. (FK4). FK5 constants from "Astronomical Almanac Explanatory
#          Supplement 1992, page 104 Table 3.211.1.
#
#    PROCEDURE CALLED:
##          Function PREMAT - computes precession matrix
#
#    REVISION HISTORY
#          Written, Wayne Landsman, STI Corporation  August 1986
#          Correct negative output RA values   February 1989
#          Added /PRINT keyword      W. Landsman   November, 1991
#          Provided FK5 (J2000.0)  I. Freedman   January 1994
#          Precession Matrix computation now in PREMAT   W. Landsman June 1994
#          Added /RADIAN keyword                         W. Landsman June 1997
#          Converted to IDL V5.0   W. Landsman   September 1997
#          Correct negative output RA values when /RADIAN used    March 1999
#          Work for arrays, not just vectors  W. Landsman    September 2003
#          Convert to PythonSergey KoposovJuly 2010 '''
   scal = True
   if isinstance(ra0, ndarray):
      ra = ra0.copy()
      dec = dec0.copy()
      scal = False
   else:
      ra=array([ra0])
      dec=array([dec0])
   npts = ra.size

   if not radian:
      ra_rad = deg2rad(ra)     #Convert to double precision if not already
      dec_rad = deg2rad(dec)
   else:
      ra_rad = ra
      dec_rad = dec

   a = cos(dec_rad)

   x = zeros((npts, 3))
   x[:,0] = a * cos(ra_rad)
   x[:,1] = a * sin(ra_rad)
   x[:,2] = sin(dec_rad)

   # Use PREMAT function to get precession matrix from Equinox1 to Equinox2

   r = premat(equinox1, equinox2, fk4=fk4)

   x2 = transpose(dot(transpose(r), transpose(x)))      #rotate to get output direction cosines

   ra_rad = zeros(npts) + arctan2(x2[:,1], x2[:,0])
   dec_rad = zeros(npts) + arcsin(x2[:,2])

   if not radian:
      ra = rad2deg(ra_rad)
      ra = ra + (ra < 0.) * 360.e0            #RA between 0 and 360 degrees
      dec = rad2deg(dec_rad)
   else:
      ra = ra_rad
      dec = dec_rad
      ra = ra + (ra < 0.) * 2.0e0 * pi

#   if do#print:
      #print 'Equinox (%.2f): %f,%f' % (equinox2, ra, dec)
#   if scal:
#      ra, dec = ra[0], dec[0]
   return ra, dec


text:
DROP TABLE IF EXISTS activity_type;
CREATE TABLE activity_type
(
   id integer auto_increment primary key,
   name varchar(50) not null,
   description text null,
   pair_one varchar(3) null,
   pair_two varchar(3) null
);

INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Аграрно-экологическая', '1.1', '4.4');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Проектирование полезных форм', '3.2', '2.1');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Психолого-терапевтическая', '3.5', '3.3');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Духовно-религиозная', '7.2', '7.4');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('СМИ', '6.4', '2.5');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Естественнонаучная и математическая', '5.1', '3.4');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Культуры и искусств', '6.5', '7.5');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Медико-оздоровительная', '4.3', '1.2');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Общественно-научная', '4.1', '5.5');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Педагогический', '3.1', '5.2');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Социальная (досуг, игровая, развивающая) сфера услуг', '1.4', '4.5');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Социально-бытовая сфера услуг', '2.3', '2.2');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Техническое творчество', '4.2', '5.3');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Экономическая', '7.1', '1.5');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Государственно-правовая', '6.1', '2.4');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Материальное производство', '6.3', '1.3');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Идеологическая', '5.4', '6.2');
INSERT INTO `activity_type` (`name`, `pair_one`, `pair_two`) VALUES ('Философская', '8.1', '7.3');


text:
namespace content {

RenderWidgetHostObserver::~RenderWidgetHostObserver() {
  DCHECK(!IsInObserverList());
}

}  // namespace content


text:
<!-- Generated by //third_party/WebKit/LayoutTests/bluetooth/generate.py -->
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
promise_test(() => {
  return setBluetoothFakeAdapter('TwoHeartRateServicesAdapter')
    .then(() => requestDeviceWithKeyDown({
      filters: [{services: ['heart_rate']}],
      optionalServices: ['generic_access']}))
    .then(device => device.gatt.connect())
    .then(gattServer => Promise.all([
      gattServer.getPrimaryServices(),
      gattServer.getPrimaryServices()]))
    .then(services_arrays => {
      // Convert to arrays if necessary.
      for (let i = 0; i < services_arrays.length; i++) {
        services_arrays[i] = [].concat(services_arrays[i]);
      }

      for (let i = 1; i < services_arrays.length; i++) {
        assert_equals(services_arrays[0].length, services_arrays[i].length);
      }

      let base_set = new Set(services_arrays[0]);
      for (let services of services_arrays) {
        services.forEach(service => assert_true(base_set.has(service)));
      }
    });
}, 'Calls to getPrimaryServices should return the same object.');

</script>


text:
package org.cometd.javascript.dojo;

import org.cometd.javascript.AbstractCometDTest;
import org.junit.jupiter.api.BeforeEach;

public abstract class AbstractCometDDojoTest extends AbstractCometDTest {
    @BeforeEach
    public void init() throws Exception {
        initCometDServer(null);
    }

    @Override
    protected void provideCometD(String transport) {
        String dojoBaseURL = "/js/dojo";
        javaScript.evaluate(getClass().getResource(dojoBaseURL + "/dojo.js.uncompressed.js"));
        evaluateScript("cometd", "" +
                "var cometdModule;" +
                "var cometd;" +
                "var originalTransports = {};" +
                "require({" +
                "    packages: [{name: 'cometd', location: '../cometd'}]," +
                "    baseUrl: '" + dojoBaseURL + "'" +
                "}, ['cometd/cometd', 'dojox/cometd'], function(m, c) {" +
                "    cometdModule = m;" +
                "    cometd = c; " +
                "    var transportNames = cometd.getTransportTypes();" +
                "    for (var i = 0; i < transportNames.length; ++i) {" +
                "        var transportName = transportNames[i];" +
                "        originalTransports[transportName] = cometd.findTransport(transportName);" +
                "    }" +
                "});");
        if (transport != null) {
            evaluateScript("only_" + transport, "" +
                    "cometd.unregisterTransports();" +
                    "cometd.registerTransport('" + transport + "', originalTransports['" + transport + "']);");
        }
    }
}


text:
FROM centos:centos6
MAINTAINER Sean Quinn <swquinn@gmail.com>

RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
RUN yum -y clean all;
RUN yum -y install binutils compat-libstdc++-33.x86_64 elfutils-libelf \
    elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel \
    glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel \
    make sysstat unixodbc unixodbc-devel unzip zlibc; yum -y clean all;
RUN ln -s /usr/lib/x86_64-linux-gnu /usr/lib64; \
    ln -sf /bin/bash /bin/sh;
RUN mkdir -p /opt/app/oracle/product/11g
RUN mkdir -p /var/opt/oracle
RUN mkdir -p /tmp/orainst

# Create user groups and users, add user to groups.
RUN /usr/sbin/groupadd -g 5001 oinstall; \
    /usr/sbin/groupadd -g 5002 dba; \
    /usr/sbin/useradd  -u 5001 -m -g oinstall -G dba,oinstall -s /bin/bash oracle; \
    echo "oracle:password"|chpasswd;

#
#
#
ADD orainst /tmp/orainst

#
# Copy over the configuration files to the /var/opt/oracle/config directory
# in the container.
#
# Once you've done this, move the oraInst.loc file to the /etc directory.
#
ADD config /var/opt/oracle

#
# Explode the Oracle installation files into the installer.
#
RUN unzip "/tmp/orainst/*.zip" -d /tmp/orainst

# Assign ownership and permissions to the oracle directories, recursively.
RUN chown -R oracle:oinstall /opt/app
RUN chown -R oracle:oinstall /tmp/orainst
RUN chmod -R 775 /opt/app
RUN chmod +x /tmp/orainst/database/runInstaller

# Modify the Oracle environment settings, export them to the bash profile.
ENV TMP /tmp
ENV TMPDIR /tmp
ENV HOSTNAME localhost
ENV ORACLE_SID orcl
ENV ORACLE_BASE /opt/app/oracle
ENV ORACLE_HOME /opt/app/oracle/product/11g
ENV LD_LIBRARY_PATH $ORACLE_HOME/lib:/lib:/usr/lib
ENV CLASSPATH $ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ENV PATH $ORACLE_HOME/bin:$PATH

EXPOSE 1521

#
# Change to the Oracle user, and run the installer.
#
#USER oracle

#ENTRYPOINT ["/tmp/orainst/database/runInstaller"]
#CMD ["--help"]


text:
"use strict";

// run tests using
// npm run test-e2e

// configure chai assertions
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
var expect = chai.expect;

var Q = require("q");

var searchCrawler = require("./../../src/searchCrawler.js");

function randomName()
{
  var dt = new Date().valueOf();

  return "test" + dt.toString();
}

describe("searchCrawler", function() {

  var testSiteName = randomName();
  var testSiteUrl = "http://www.google.com/";

  function containsTestSite(sites){
    var filtered = sites.filter(function(s){
     return s.name == testSiteName && s.url == testSiteUrl;
      });

    return filtered.length == 1;
  }

  function notContainsTestSite(sites){
    var filtered = sites.filter(function(s){
     return s.name == testSiteName;
      });

    return filtered.length == 0;
  }

  before(function(){
    return searchCrawler.init();
  });

  var previousSites;

  beforeEach(function(){
    var listPromise = searchCrawler.getSites();

    listPromise.then(function(result){
      previousSites = result;
    });

    return listPromise;
  });

  describe("insertSite", function() {

    it("Should inserted a site", function() {

      var result = searchCrawler.insertSite({name:testSiteName, url:testSiteUrl});

      return Q.all([
         expect(result).to.eventually.have.property("_id"),
         expect(result).to.eventually.have.property("name", testSiteName),
         expect(result).to.eventually.have.property("url", testSiteUrl),
        ]);
    });

    it("getSites should returns the created site", function() {

      var result = searchCrawler.insertSite({name:testSiteName, url:testSiteUrl});

      var sites = result.then(function(){
        return searchCrawler.getSites();
      });

      return Q.all([
         expect(sites).to.eventually.have.property("length", previousSites.length+1),
         expect(sites).to.eventually.satisfy(containsTestSite)
        ]);
    });

    it("getSite should return the created site", function() {

      var result = searchCrawler.insertSite({name:testSiteName, url:testSiteUrl});

      var site = result.then(function(){
        return searchCrawler.getSite(testSiteName);
      });

      return Q.all([
         expect(site).to.eventually.have.property("_id"),
         expect(site).to.eventually.have.property("name", testSiteName),
         expect(site).to.eventually.have.property("url", testSiteUrl),
        ]);
    });

    it("Unknown fields will be ignored", function() {

      var result = searchCrawler.insertSite({
        name:testSiteName,
        url:testSiteUrl,
        invalidField:"test"
      });

      var site = result.then(function(){
        return searchCrawler.getSite(testSiteName);
      });

      return Q.all([
         expect(site).to.eventually.not.have.property("invalidField"),
        ]);
    });

    afterEach(function(){
      return searchCrawler.removeSite(testSiteName);
    });

  });

  describe("insertSite Errors", function() {

    it("Name is required", function() {

      var result = searchCrawler.insertSite({
        url:testSiteUrl,
      });

      return Q.all([
         expect(result).to.eventually.be.rejected,
        ]);
    });

    it("Url is required", function() {

      var result = searchCrawler.insertSite({
        name:testSiteName,
      });

      return Q.all([
         expect(result).to.eventually.be.rejected,
        ]);
    });

  });

  describe("removeSite", function() {

    beforeEach(function(){
      return searchCrawler.insertSite({name:testSiteName, url:testSiteUrl});
    });

    it("Should remove the specified site", function() {

      var result = searchCrawler.removeSite(testSiteName);

      return Q.all([
         expect(result).to.eventually.have.property("_id"),
         expect(result).to.eventually.have.property("name", testSiteName),
        ]);
    });

    it("getSites shouldn't return the site", function() {

      var result = searchCrawler.removeSite(testSiteName);

      var sites = result.then(function(){
        return searchCrawler.getSites();
      });

      return Q.all([
         expect(sites).to.eventually.have.property("length", previousSites.length),
         expect(sites).to.eventually.satisfy(notContainsTestSite)
        ]);
    });

    it("getSite should fail", function() {

      var result = searchCrawler.removeSite(testSiteName);

      var site = result.then(function(){
        return searchCrawler.getSite(testSiteName);
      });

      return Q.all([
         expect(site).to.eventually.be.rejected,
        ]);
    });

  });

  describe("registerPage", function() {

    beforeEach(function(){
      return searchCrawler.insertSite({name:testSiteName, url:testSiteUrl});
    });

    it("Should register a specific page", function() {

      var result = searchCrawler.registerPage(testSiteName, "http://nodejs.org/");

      return Q.all([
         expect(result).to.eventually.have.property("_id"),
         expect(result).to.eventually.have.property("url", "http://nodejs.org/"),
         expect(result).to.eventually.have.property("title", "Node.js"),
        ]);
    });

    it("sitePageCount should be incremented", function() {

      var result = searchCrawler.registerPage(testSiteName, "http://nodejs.org/");

      var pageCount = result.then(function(){
        return searchCrawler.sitePageCount(testSiteName);
      });

      return Q.all([
         expect(pageCount).to.eventually.equal(1)
        ]);
    });

    afterEach(function(){
      return searchCrawler.removeSite(testSiteName);
    });

  });

  describe("searchPages", function() {

    beforeEach(function(){
      return searchCrawler.insertSite({name:testSiteName, url:testSiteUrl})
      .then(function(){
        return searchCrawler.registerPage(testSiteName, "http://nodejs.org/");
      });
    });

    it("Should search a page", function() {

      var result = searchCrawler.searchPages(testSiteName, "node", 1);

      var item = result.then(function(r){
        return r[0];
      });

      return Q.all([
         expect(item).to.eventually.have.property("url", "http://nodejs.org/"),
         expect(item).to.eventually.have.property("title", "Node.js"),
        ]);
    });

    it("Search an invalid expression should return an empty list", function() {

      var result = searchCrawler.searchPages(testSiteName, "invalidExpression", 1);

      return Q.all([
         expect(result).to.eventually.have.property("length", 0),
        ]);
    });

    afterEach(function(){
      return searchCrawler.removeSite(testSiteName);
    });

  });

  describe("siteJobs", function() {

    beforeEach(function(){
      return searchCrawler
      .insertSite({name:testSiteName, url:testSiteUrl})
      .then(function(){
        var config = {
          contentSelector: "body",
          crawlingCron: "1 1 1 1 1 1",
          urlPattern: "." }
        return searchCrawler.updateSiteConfig(testSiteName, config);
      });
    });

    it("Should load jobs", function() {

      var result = searchCrawler.loadJobs();

      var item = result.then(function(r){
        return r.filter(function(j){
          return j.siteName == testSiteName;
        })[0];
      });

      return Q.all([
        expect(result).to.eventually.have.length.above(0),
        expect(item).to.eventually.exist,
        expect(item).to.eventually.have.property("cronExpression", "1 1 1 1 1 1"),
        ]);
      });

    it("Should unload jobs", function() {

      var result = searchCrawler.unloadJobs();

      return Q.all([
          expect(result).to.eventually.have.property("length", 0),
        ]);
    });

    afterEach(function(){
      return searchCrawler.removeSite(testSiteName);
    });
  });

});


text:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>SrcCtrl</title>

        <link href="Content/lib/winjs-4.0.1/css/ui-light.css" rel="stylesheet" />
        <script src="Content/lib/winjs-4.0.1/js/base.js"></script>
        <script src="Content/lib/winjs-4.0.1/js/ui.js"></script>

        <link href="Content/style/default.css" rel="stylesheet" />
        <script src="Application.js"></script>

    </head>
    <body class="win-type-body">
    <script defer>
        // Define EntryPoint
        var application = new SrcCtrl.Application();
    </script>
    </body>
</html>


text:
VEIL_VERSION = 0.9.0

# OS version
UNAME = $(shell uname -s)

# Colors
COL_R = "\\033[31m"
COL_G = "\\033[32m"
COL_Y = "\\033[33m"
ENDC  = "\\033[0m"

# -- 2. Sources and output --

# Extension for source page files
PAGE_EXT = jade

# Estension for source stylesheets
STYLE_EXT = styl

# Source files
PAGES       = $(shell find sources/pages/ \
                -name "*.$(PAGE_EXT)" \
                -not -name "_*.$(PAGE_EXT)" 2>/dev/null)
STYLESHEETS = $(shell find sources/stylesheets/ \
                -name "*.$(STYLE_EXT)" \
                -not -name "_*.$(STYLE_EXT)" 2>/dev/null)
LAYOUTS     = $(shell find sources/layouts/ \
                -name "*.$(PAGE_EXT)" 2>/dev/null)
OTHER       = $(shell find static -type f 2>/dev/null)

# Output directories
OUTDIR    = build
ASSETSDIR = $(OUTDIR)/assets
CSSDIR    = $(ASSETSDIR)/css

# Output files
HTML = $(PAGES:sources/pages/%.$(PAGE_EXT)=$(OUTDIR)/%.html)
CSS = $(STYLESHEETS:sources/stylesheets/%.$(STYLE_EXT)=$(CSSDIR)/%.css)
STATIC = $(OTHER:static/%=$(ASSETSDIR)/%)

# -- 3. Commands --

# Echo command
ECHO = echo -e

# Command used by the watch rule
WATCH = inotifywait -qrm sources/ static/ -e CLOSE_WRITE | while read; do make -s all; done

# OS X-specific overrides
ifeq ($(UNAME),Darwin)
ECHO = echo
WATCH = fswatch sources/:static/ "make -s all"
endif

# Commands used by the page-building rule
define page-cc =
@ jade -P -o $(shell dirname $@) >/dev/null $<
endef

# Commands used by the stylesheet-building rule
define stylesheet-cc =
@ stylus -u autoprefixer-stylus -o $(shell dirname $@) >/dev/null $<
endef

# Commands used by the assets-building rule
define asset-cc =
@ mkdir -p $(shell dirname $@)
@ cp $< $(shell dirname $@)
endef

# Override variables with included config.mk if it exists
-include config.mk

# -- 4. Rules and recipes --

.DEFAULT_GOAL := # Reset default goal

# Default rule: build everything
all: announce-rebuild html css assets
	@ $(ECHO) "$(COL_G)✓ Done$(ENDC)"

watch:
	@ $(ECHO) "$(COL_Y)▸ Watching for changes$(ENDC)"
	@ $(WATCH)

# Cleanup: remove all output files
clean:
	@ $(ECHO) "$(COL_Y)♻ Cleaning$(ENDC)"
	@ rm -rf $(OUTDIR)

# Meta-tasks for html, css and static
html:   $(HTML)
css:    $(CSS)
assets: $(STATIC)

# Rules for building the output folders
$(OUTDIR):
	@ mkdir -p $(OUTDIR)

$(ASSETSDIR):
	@ mkdir -p $(ASSETSDIR)

$(CSSDIR):
	@ mkdir -p $(CSSDIR)

# Rule to announce a rebuild
announce-rebuild:
	@ $(ECHO) "$(COL_Y)▸ Rebuilding$(ENDC)"

# Rule for HTML files
$(OUTDIR)/%.html: sources/pages/%.$(PAGE_EXT) $(LAYOUTS) | $(OUTDIR)
	@ $(ECHO) "  $(@:$(OUTDIR)/%=%)"
	$(page-cc)

# Rule for stylesheets
$(CSSDIR)/%.css: sources/stylesheets/%.$(STYLE_EXT) | $(CSSDIR)
	@ $(ECHO) "  $(@:$(OUTDIR)/%=%)"
	$(stylesheet-cc)

# Rules for static assets
$(ASSETSDIR)/%: static/% | $(ASSETSDIR)
	@ $(ECHO) "  $(@:$(OUTDIR)/%=%)"
	$(asset-cc)

# Setup task
setup: npm-deps bootstrap

# Install npm dependencies
npm-deps:
	@ $(ECHO) "$(COL_Y)▸ Installing dependencies$(ENDC)"
	@ sudo npm install -g jade stylus autoprefixer-stylus

# Bootstrap files
bootstrap:
	@ test -d sources && { echo -e "\n$(COL_R)✗ Already set up$(ENDC)\n"; exit 1; } || true
	@ $(ECHO) "$(COL_Y)▸ Creating directory structure$(ENDC)"
	@ mkdir -p sources/{layouts,pages,stylesheets} static
	@
	@ $(ECHO) "$(COL_Y)▸ Installing normalize$(ENDC)"
	@ curl -sL https://raw.githubusercontent.com/skw/normalize.stylus/master/normalize.styl -o sources/stylesheets/_normalize.styl
	@ sed -i "9s/^/\/\//" sources/stylesheets/_normalize.styl
	@ sed -i "s/\(box-sizing\)(\([^)]\+\))/\1 \2/" sources/stylesheets/_normalize.styl
	@ $(ECHO) "  sources/stylesheets/_normalize.styl"
	@
	@ $(ECHO) "$(COL_Y)▸ Bootstraping with default files$(ENDC)"
	@ curl -sL https://raw.githubusercontent.com/madx/veil/master/skel/default.jade -o sources/layouts/default.jade
	@ $(ECHO) "  sources/layout/default.jade"
	@ curl -sL https://raw.githubusercontent.com/madx/veil/master/skel/index.jade -o sources/pages/index.jade
	@ $(ECHO) "  sources/pages/index.jade"
	@ curl -sL https://raw.githubusercontent.com/madx/veil/master/skel/stylesheet.styl -o sources/stylesheets/stylesheet.styl
	@ $(ECHO) "  sources/stylesheets/stylesheet.styl"
	@
	@ $(ECHO) "$(COL_G)✓ Done$(ENDC)"

# Upgrade this makefile
upgrade:
	@ $(ECHO) "$(COL_Y)▸ Fetching latest Makefile$(ENDC)"
	@ curl -sL https://raw.githubusercontent.com/madx/veil/master/Makefile > Makefile
	@ $(ECHO) "$(COL_G)✓ Done$(ENDC)"

.PHONY: all clean setup npm-deps bootstrap announce-rebuild upgrade


text:
namespace Microsoft.Azure.Management.DataLake.Analytics.Models
{
    using Microsoft.Azure;
    using Microsoft.Azure.Management;
    using Microsoft.Azure.Management.DataLake;
    using Microsoft.Azure.Management.DataLake.Analytics;
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;
    using System.Runtime;
    using System.Runtime.Serialization;

    /// <summary>
    /// Defines values for SeverityTypes.
    /// </summary>
    [JsonConverter(typeof(StringEnumConverter))]
    public enum SeverityTypes
    {
        [EnumMember(Value = "Warning")]
        Warning,
        [EnumMember(Value = "Error")]
        Error,
        [EnumMember(Value = "Info")]
        Info,
        [EnumMember(Value = "SevereWarning")]
        SevereWarning,
        [EnumMember(Value = "Deprecated")]
        Deprecated,
        [EnumMember(Value = "UserWarning")]
        UserWarning
    }
    internal static class SeverityTypesEnumExtension
    {
        internal static string ToSerializedValue(this SeverityTypes? value)  =>
            value == null ? null : ((SeverityTypes)value).ToSerializedValue();

        internal static string ToSerializedValue(this SeverityTypes value)
        {
            switch( value )
            {
                case SeverityTypes.Warning:
                    return "Warning";
                case SeverityTypes.Error:
                    return "Error";
                case SeverityTypes.Info:
                    return "Info";
                case SeverityTypes.SevereWarning:
                    return "SevereWarning";
                case SeverityTypes.Deprecated:
                    return "Deprecated";
                case SeverityTypes.UserWarning:
                    return "UserWarning";
            }
            return null;
        }

        internal static SeverityTypes? ParseSeverityTypes(this string value)
        {
            switch( value )
            {
                case "Warning":
                    return SeverityTypes.Warning;
                case "Error":
                    return SeverityTypes.Error;
                case "Info":
                    return SeverityTypes.Info;
                case "SevereWarning":
                    return SeverityTypes.SevereWarning;
                case "Deprecated":
                    return SeverityTypes.Deprecated;
                case "UserWarning":
                    return SeverityTypes.UserWarning;
            }
            return null;
        }
    }
}


text:
const TESTMAX = 10; //Maximum number of tests that run in a loop.

describe("RactiveRender component test suite", function () {
    var rrComp = null; //RactiveRender component
    var rrConf; // default configuration

    beforeEach(function(){
        rrConf = {
            template : "toto",
            container : "toto",
            model : {}
        };
        rrComp = new RactiveRender();
    });

    afterEach(function () {
        hub.reset();
        rrComp = null;
        rrConf = null;
    });

    it("Should start properly with proper configuration", function() {
        //Given (rrComp)

        //When
        hub.registerComponent(rrComp,rrConf);
        hub.start();
     });

    it("Should register a RenderService", function() {
        //Given (rrComp)

        //When
        hub.registerComponent(rrComp,rrConf);
        hub.start();

        //Then
        expect(hub.getServiceReferences(window.RenderService).length).toBe(1);
    });

    it("Should register a RactiveRenderService", function() {
        //Given (rrComp)

        //When
        hub.registerComponent(rrComp,rrConf);
        hub.start();

        //Then
        expect(hub.getServiceReferences(window.RactiveRenderService).length).toBe(1);
    });

});


text:
package dcraft.json3;

import java.util.Arrays;

import dcraft.json3.util.ByteArrayBuilder;

/**
 * Abstract base class used to define specific details of which
 * variant of Base64 encoding/decoding is to be used. Although there is
 * somewhat standard basic version (so-called "MIME Base64"), other variants
 * exists, see Base64 Wikipedia entry for details.
 *
 * @author Tatu Saloranta
 */
public final class Base64Variant
    implements java.io.Serializable
{
    private final static int INT_SPACE = 0x20;

    // We'll only serialize name
    private static final long serialVersionUID = 1L;

    /**
     * Placeholder used by "no padding" variant, to be used when a character
     * value is needed.
     */
    final static char PADDING_CHAR_NONE = '\0';

    /**
     * Marker used to denote ascii characters that do not correspond
     * to a 6-bit value (in this variant), and is not used as a padding
     * character.
     */
    public final static int BASE64_VALUE_INVALID = -1;

    /**
     * Marker used to denote ascii character (in decoding table) that
     * is the padding character using this variant (if any).
     */
    public final static int BASE64_VALUE_PADDING = -2;

    /*
    /**********************************************************
    /* Encoding/decoding tables
    /**********************************************************
     */

    /**
     * Decoding table used for base 64 decoding.
     */
    private final transient int[] _asciiToBase64 = new int[128];

    /**
     * Encoding table used for base 64 decoding when output is done
     * as characters.
     */
    private final transient char[] _base64ToAsciiC = new char[64];

    /**
     * Alternative encoding table used for base 64 decoding when output is done
     * as ascii bytes.
     */
    private final transient byte[] _base64ToAsciiB = new byte[64];

    /*
    /**********************************************************
    /* Other configuration
    /**********************************************************
     */

    /**
     * Symbolic name of variant; used for diagnostics/debugging.
     *

     * Note that this is the only non-transient field; used when reading
     * back from serialized state
     */
    protected final String _name;

    /**
     * Whether this variant uses padding or not.
     */
    protected final transient boolean _usesPadding;

    /**
     * Characted used for padding, if any ({@link #PADDING_CHAR_NONE} if not).
     */
    protected final transient char _paddingChar;

    /*
     * Maximum number of encoded base64 characters to output during encoding
     * before adding a linefeed, if line length is to be limited
     * ({@link java.lang.Integer#MAX_VALUE} if not limited).
     *

     * Note: for some output modes (when writing attributes) linefeeds may
     * need to be avoided, and this value ignored.
     */
    protected final transient int _maxLineLength;

    /*
    /**********************************************************
    /* Life-cycle
    /**********************************************************
     */

    public Base64Variant(String name, String base64Alphabet, boolean usesPadding, char paddingChar, int maxLineLength)
    {
        _name = name;
        _usesPadding = usesPadding;
        _paddingChar = paddingChar;
        _maxLineLength = maxLineLength;

        // Ok and then we need to create codec tables.

        // First the main encoding table:
        int alphaLen = base64Alphabet.length();
        if (alphaLen != 64) {
            throw new IllegalArgumentException("Base64Alphabet length must be exactly 64 (was "+alphaLen+")");
        }

        // And then secondary encoding table and decoding table:
        base64Alphabet.getChars(0, alphaLen, _base64ToAsciiC, 0);
        Arrays.fill(_asciiToBase64, BASE64_VALUE_INVALID);
        for (int i = 0; i < alphaLen; ++i) {
            char alpha = _base64ToAsciiC[i];
            _base64ToAsciiB[i] = (byte) alpha;
            _asciiToBase64[alpha] = i;
        }

        // Plus if we use padding, add that in too
        if (usesPadding) {
            _asciiToBase64[(int) paddingChar] = BASE64_VALUE_PADDING;
        }
    }

    /*
     * "Copy constructor" that can be used when the base alphabet is identical
     * to one used by another variant except for the maximum line length
     * (and obviously, name).
     */
    public Base64Variant(Base64Variant base, String name, int maxLineLength)
    {
        this(base, name, base._usesPadding, base._paddingChar, maxLineLength);
    }

    /*
     * "Copy constructor" that can be used when the base alphabet is identical
     * to one used by another variant, but other details (padding, maximum
     * line length) differ
     */
    public Base64Variant(Base64Variant base, String name, boolean usesPadding, char paddingChar, int maxLineLength)
    {
        _name = name;
        byte[] srcB = base._base64ToAsciiB;
        System.arraycopy(srcB, 0, this._base64ToAsciiB, 0, srcB.length);
        char[] srcC = base._base64ToAsciiC;
        System.arraycopy(srcC, 0, this._base64ToAsciiC, 0, srcC.length);
        int[] srcV = base._asciiToBase64;
        System.arraycopy(srcV, 0, this._asciiToBase64, 0, srcV.length);

        _usesPadding = usesPadding;
        _paddingChar = paddingChar;
        _maxLineLength = maxLineLength;
    }

    /*
    /**********************************************************
    /* Serializable overrides
    /**********************************************************
     */

    /*
     * Method used to "demote" deserialized instances back to
     * canonical ones
     */
    protected Object readResolve() {
        return Base64Variants.valueOf(_name);
    }

    /*
    /**********************************************************
    /* Public accessors
    /**********************************************************
     */

    public String getName() { return _name; }

    public boolean usesPadding() { return _usesPadding; }
    public boolean usesPaddingChar(char c) { return c == _paddingChar; }
    public boolean usesPaddingChar(int ch) { return ch == (int) _paddingChar; }
    public char getPaddingChar() { return _paddingChar; }
    public byte getPaddingByte() { return (byte)_paddingChar; }

    public int getMaxLineLength() { return _maxLineLength; }

    /*
    /**********************************************************
    /* Decoding support
    /**********************************************************
     */

    /*
     * @return 6-bit decoded value, if valid character;
     */
    public int decodeBase64Char(char c)
    {
        int ch = (int) c;
        return (ch <= 127) ? _asciiToBase64[ch] : BASE64_VALUE_INVALID;
    }

    public int decodeBase64Char(int ch)
    {
        return (ch <= 127) ? _asciiToBase64[ch] : BASE64_VALUE_INVALID;
    }

    public int decodeBase64Byte(byte b)
    {
        int ch = (int) b;
        return (ch <= 127) ? _asciiToBase64[ch] : BASE64_VALUE_INVALID;
    }

    /*
    /**********************************************************
    /* Encoding support
    /**********************************************************
     */

    public char encodeBase64BitsAsChar(int value)
    {
        /* Let's assume caller has done necessary checks; this
         * method must be fast and inlinable
         */
        return _base64ToAsciiC[value];
    }

    /*
     * Method that encodes given right-aligned (LSB) 24-bit value
     * into 4 base64 characters, stored in given result buffer.
     */
    public int encodeBase64Chunk(int b24, char[] buffer, int ptr)
    {
        buffer[ptr++] = _base64ToAsciiC[(b24 >> 18) & 0x3F];
        buffer[ptr++] = _base64ToAsciiC[(b24 >> 12) & 0x3F];
        buffer[ptr++] = _base64ToAsciiC[(b24 >> 6) & 0x3F];
        buffer[ptr++] = _base64ToAsciiC[b24 & 0x3F];
        return ptr;
    }

    public void encodeBase64Chunk(StringBuilder sb, int b24)
    {
        sb.append(_base64ToAsciiC[(b24 >> 18) & 0x3F]);
        sb.append(_base64ToAsciiC[(b24 >> 12) & 0x3F]);
        sb.append(_base64ToAsciiC[(b24 >> 6) & 0x3F]);
        sb.append(_base64ToAsciiC[b24 & 0x3F]);
    }

    /*
     * Method that outputs partial chunk (which only encodes one
     * or two bytes of data). Data given is still aligned same as if
     * it as full data; that is, missing data is at the "right end"
     * (LSB) of int.
     *
     * @param outputBytes Number of encoded bytes included (either 1 or 2)
     */
    public int encodeBase64Partial(int bits, int outputBytes, char[] buffer, int outPtr)
    {
        buffer[outPtr++] = _base64ToAsciiC[(bits >> 18) & 0x3F];
        buffer[outPtr++] = _base64ToAsciiC[(bits >> 12) & 0x3F];
        if (_usesPadding) {
            buffer[outPtr++] = (outputBytes == 2) ?
                _base64ToAsciiC[(bits >> 6) & 0x3F] : _paddingChar;
            buffer[outPtr++] = _paddingChar;
        } else {
            if (outputBytes == 2) {
                buffer[outPtr++] = _base64ToAsciiC[(bits >> 6) & 0x3F];
            }
        }
        return outPtr;
    }

    public void encodeBase64Partial(StringBuilder sb, int bits, int outputBytes)
    {
        sb.append(_base64ToAsciiC[(bits >> 18) & 0x3F]);
        sb.append(_base64ToAsciiC[(bits >> 12) & 0x3F]);
        if (_usesPadding) {
            sb.append((outputBytes == 2) ?
                      _base64ToAsciiC[(bits >> 6) & 0x3F] : _paddingChar);
            sb.append(_paddingChar);
        } else {
            if (outputBytes == 2) {
                sb.append(_base64ToAsciiC[(bits >> 6) & 0x3F]);
            }
        }
    }

    public byte encodeBase64BitsAsByte(int value)
    {
        // As with above, assuming it is 6-bit value
        return _base64ToAsciiB[value];
    }

    /*
     * Method that encodes given right-aligned (LSB) 24-bit value
     * into 4 base64 bytes (ascii), stored in given result buffer.
     */
    public int encodeBase64Chunk(int b24, byte[] buffer, int ptr)
    {
        buffer[ptr++] = _base64ToAsciiB[(b24 >> 18) & 0x3F];
        buffer[ptr++] = _base64ToAsciiB[(b24 >> 12) & 0x3F];
        buffer[ptr++] = _base64ToAsciiB[(b24 >> 6) & 0x3F];
        buffer[ptr++] = _base64ToAsciiB[b24 & 0x3F];
        return ptr;
    }

    /*
     * Method that outputs partial chunk (which only encodes one
     * or two bytes of data). Data given is still aligned same as if
     * it as full data; that is, missing data is at the "right end"
     * (LSB) of int.
     *
     * @param outputBytes Number of encoded bytes included (either 1 or 2)
     */
    public int encodeBase64Partial(int bits, int outputBytes, byte[] buffer, int outPtr)
    {
        buffer[outPtr++] = _base64ToAsciiB[(bits >> 18) & 0x3F];
        buffer[outPtr++] = _base64ToAsciiB[(bits >> 12) & 0x3F];
        if (_usesPadding) {
            byte pb = (byte) _paddingChar;
            buffer[outPtr++] = (outputBytes == 2) ?
                _base64ToAsciiB[(bits >> 6) & 0x3F] : pb;
            buffer[outPtr++] = pb;
        } else {
            if (outputBytes == 2) {
                buffer[outPtr++] = _base64ToAsciiB[(bits >> 6) & 0x3F];
            }
        }
        return outPtr;
    }

    /*
    /**********************************************************
    /* Convenience conversion methods for String to/from bytes
    /* use case.
    /**********************************************************
     */

    /*
     * Convenience method for converting given byte array as base64 encoded
     * String using this variant's settings.
     * Resulting value is "raw", that is, not enclosed in double-quotes.
     *
     * @param input Byte array to encode
     */
    public String encode(byte[] input)
    {
        return encode(input, false);
    }

    /*
     * Convenience method for converting given byte array as base64 encoded String
     * using this variant's settings,
     * optionally enclosed in double-quotes.
     *
     * @param input Byte array to encode
     * @param addQuotes Whether to surround resulting value in double quotes or not
     */
    public String encode(byte[] input, boolean addQuotes)
    {
        int inputEnd = input.length;
        StringBuilder sb;
        {
            // let's approximate... 33% overhead, ~= 3/8 (0.375)
            int outputLen = inputEnd + (inputEnd >> 2) + (inputEnd >> 3);
            sb = new StringBuilder(outputLen);
        }
        if (addQuotes) {
            sb.append('"');
        }

        int chunksBeforeLF = getMaxLineLength() >> 2;

        // Ok, first we loop through all full triplets of data:
        int inputPtr = 0;
        int safeInputEnd = inputEnd-3; // to get only full triplets

        while (inputPtr <= safeInputEnd) {
            // First, mash 3 bytes into lsb of 32-bit int
            int b24 = ((int) input[inputPtr++]) << 8;
            b24 |= ((int) input[inputPtr++]) & 0xFF;
            b24 = (b24 << 8) | (((int) input[inputPtr++]) & 0xFF);
            encodeBase64Chunk(sb, b24);
            if (--chunksBeforeLF <= 0) {
                // note: must quote in JSON value, so not really useful...
                sb.append('\\');
                sb.append('n');
                chunksBeforeLF = getMaxLineLength() >> 2;
            }
        }

        // And then we may have 1 or 2 leftover bytes to encode
        int inputLeft = inputEnd - inputPtr; // 0, 1 or 2
        if (inputLeft > 0) { // yes, but do we have room for output?
            int b24 = ((int) input[inputPtr++]) << 16;
            if (inputLeft == 2) {
                b24 |= (((int) input[inputPtr++]) & 0xFF) << 8;
            }
            encodeBase64Partial(sb, b24, inputLeft);
        }

        if (addQuotes) {
            sb.append('"');
        }
        return sb.toString();
    }

    /*
     * Convenience method for decoding contents of a Base64-encoded String,
     * using this variant's settings.
     *
     * @param input
     *
     * @since 2.2.3
     *
     * @throws IllegalArgumentException if input is not valid base64 encoded data
     */
    public byte[] decode(String input) throws IllegalArgumentException
    {
        ByteArrayBuilder b = new ByteArrayBuilder();
        decode(input, b);
        return b.toByteArray();
    }

    /*
     * Convenience method for decoding contents of a Base64-encoded String,
     * using this variant's settings
     * and appending decoded binary data using provided {@link ByteArrayBuilder}.
     *

     * NOTE: builder will NOT be reset before decoding (nor cleared afterwards);
     * assumption is that caller will ensure it is given in proper state, and
     * used as appropriate afterwards.
     *
     * @since 2.2.3
     *
     * @throws IllegalArgumentException if input is not valid base64 encoded data
     */
    public void decode(String str, ByteArrayBuilder builder) throws IllegalArgumentException
    {
        int ptr = 0;
        int len = str.length();

        main_loop:
        while (ptr < len) {
            // first, we'll skip preceding white space, if any
            char ch;
            do {
                ch = str.charAt(ptr++);
                if (ptr >= len) {
                    break main_loop;
                }
            } while (ch <= INT_SPACE);
            int bits = decodeBase64Char(ch);
            if (bits < 0) {
                _reportInvalidBase64(ch, 0, null);
            }
            int decodedData = bits;
            // then second base64 char; can't get padding yet, nor ws
            if (ptr >= len) {
                _reportBase64EOF();
            }
            ch = str.charAt(ptr++);
            bits = decodeBase64Char(ch);
            if (bits < 0) {
                _reportInvalidBase64(ch, 1, null);
            }
            decodedData = (decodedData << 6) | bits;
            // third base64 char; can be padding, but not ws
            if (ptr >= len) {
                // but as per [JACKSON-631] can be end-of-input, iff not using padding
                if (!usesPadding()) {
                    decodedData >>= 4;
                    builder.append(decodedData);
                    break;
                }
                _reportBase64EOF();
            }
            ch = str.charAt(ptr++);
            bits = decodeBase64Char(ch);

            // First branch: can get padding (-> 1 byte)
            if (bits < 0) {
                if (bits != Base64Variant.BASE64_VALUE_PADDING) {
                    _reportInvalidBase64(ch, 2, null);
                }
                // Ok, must get padding
                if (ptr >= len) {
                    _reportBase64EOF();
                }
                ch = str.charAt(ptr++);
                if (!usesPaddingChar(ch)) {
                    _reportInvalidBase64(ch, 3, "expected padding character '"+getPaddingChar()+"'");
                }
                // Got 12 bits, only need 8, need to shift
                decodedData >>= 4;
                builder.append(decodedData);
                continue;
            }
            // Nope, 2 or 3 bytes
            decodedData = (decodedData << 6) | bits;
            // fourth and last base64 char; can be padding, but not ws
            if (ptr >= len) {
                // but as per [JACKSON-631] can be end-of-input, iff not using padding
                if (!usesPadding()) {
                    decodedData >>= 2;
                    builder.appendTwoBytes(decodedData);
                    break;
                }
                _reportBase64EOF();
            }
            ch = str.charAt(ptr++);
            bits = decodeBase64Char(ch);
            if (bits < 0) {
                if (bits != Base64Variant.BASE64_VALUE_PADDING) {
                    _reportInvalidBase64(ch, 3, null);
                }
                decodedData >>= 2;
                builder.appendTwoBytes(decodedData);
            } else {
                // otherwise, our triple is now complete
                decodedData = (decodedData << 6) | bits;
                builder.appendThreeBytes(decodedData);
            }
        }
    }

    /*
    /**********************************************************
    /* Overridden standard methods
    /**********************************************************
     */

    @Override
    public String toString() { return _name; }

    @Override
    public boolean equals(Object o) {
        // identity comparison should be dine
        return (o == this);
    }

    @Override
    public int hashCode() {
        return _name.hashCode();
    }

    /*
    /**********************************************************
    /* Internal helper methods
    /**********************************************************
     */

    /*
     * @param bindex Relative index within base64 character unit; between 0
     *   and 3 (as unit has exactly 4 characters)
     */
    protected void _reportInvalidBase64(char ch, int bindex, String msg)
        throws IllegalArgumentException
    {
        String base;
        if (ch <= INT_SPACE) {
            base = "Illegal white space character (code 0x"+Integer.toHexString(ch)+") as character #"+(bindex+1)+" of 4-char base64 unit: can only used between units";
        } else if (usesPaddingChar(ch)) {
            base = "Unexpected padding character ('"+getPaddingChar()+"') as character #"+(bindex+1)+" of 4-char base64 unit: padding only legal as 3rd or 4th character";
        } else if (!Character.isDefined(ch) || Character.isISOControl(ch)) {
            // Not sure if we can really get here... ? (most illegal xml chars are caught at lower level)
            base = "Illegal character (code 0x"+Integer.toHexString(ch)+") in base64 content";
        } else {
            base = "Illegal character '"+ch+"' (code 0x"+Integer.toHexString(ch)+") in base64 content";
        }
        if (msg != null) {
            base = base + ": " + msg;
        }
        throw new IllegalArgumentException(base);
    }

    protected void _reportBase64EOF() throws IllegalArgumentException {
        throw new IllegalArgumentException("Unexpected end-of-String in base64 content");
    }
}


text:
@implementation UITextField (Creater)

+ (UITextField *)createWithFrame:(CGRect)frame
                   withTextColor:(UIColor *)textColor
                  withTextOffset:(CGFloat)offset
                 withPlaceholder:(NSString *)placeholder
                 withBorderColor:(UIColor *)borderColor
{
    UITextField *tf = [[UITextField alloc] initWithFrame:frame];
    tf.textColor = textColor;
    tf.placeholder = placeholder;
    tf.borderStyle = UITextBorderStyleNone;
    tf.backgroundColor = [UIColor whiteColor];
    tf.layer.masksToBounds = YES;
    tf.layer.borderWidth = 0.5;
    tf.layer.borderColor = borderColor.CGColor;
    tf.layer.cornerRadius = 8.0f;
    tf.clearButtonMode = UITextFieldViewModeWhileEditing;

    UIView *leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, offset, tf.frame.size.height)];
    tf.leftView = leftView;
    tf.leftViewMode = UITextFieldViewModeAlways;
    return tf;
}
@end


text:
package com.mirhoseini.doostjoo.utils;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.preference.PreferenceManager;
import android.util.Log;

import java.util.HashMap;

public class AppSettings {
    private final static String tag = AppSettings.class.getSimpleName();
    // Current SharedPreferences Names
    static String advancedPreferencesName;
    static PreferencesMode advancedPreferencesMode;
    // Boolean Values
    static HashMap<String, Boolean> booleanValues;
    // Float Values
    static HashMap<String, Float> floatValues;
    // Long Values
    static HashMap<String, Long> longValues;
    // String Values
    static HashMap<String, String> stringValues;
    // Integer Values
    static HashMap<String, Integer> intValues;

    public static void switchDefaultSharePrefrences() {
        Log.i(tag, "Switch to default");

        switchSharePreferences(null, null);
    }

    public static void switchSharePreferences(String name, PreferencesMode mode) {
        Log.i(tag, "Switch to " + name);

        flushAllValues();
        advancedPreferencesName = name;
        advancedPreferencesMode = mode;
    }

    private static void flushAllValues() {
        Log.i(tag, "Flush All Values");

        intValues = new HashMap<String, Integer>();
        booleanValues = new HashMap<String, Boolean>();
        floatValues = new HashMap<String, Float>();
        stringValues = new HashMap<String, String>();
        longValues = new HashMap<String, Long>();
    }

    private static SharedPreferences getCurrentSharedPreferences(Context context) {
        if (advancedPreferencesName == null) {
            return PreferenceManager.getDefaultSharedPreferences(context);
        } else {
            return context.getSharedPreferences(advancedPreferencesName, advancedPreferencesMode.getValue());
        }
    }

    public static Boolean getBoolean(Context context, String key) {
        return getBoolean(context, key, null);
    }

    public static Boolean getBoolean(Context context, String key,
                                     Boolean defaultValue) {
        return getBoolean(context, key, defaultValue, false);
    }

    public static Boolean getBoolean(Context context, String key,
                                     Boolean defaultValue, boolean forceUpdate) {
        Log.i(tag, "Get " + (forceUpdate ? "Force Update " : "") + key);

        if (booleanValues == null)
            booleanValues = new HashMap<String, Boolean>();

        if (!booleanValues.containsKey(key) || forceUpdate)
            booleanValues.put(key,
                    getCurrentSharedPreferences(context)
                            .getBoolean(key, defaultValue));

        return booleanValues.get(key);
    }

    public static void setValue(Context context, String key, Boolean value) {
        Log.i(tag, "Set " + key + ":" + value);

        if (booleanValues == null)
            booleanValues = new HashMap<String, Boolean>();

        Editor editor = getCurrentSharedPreferences(context)
                .edit();
        editor.putBoolean(key, value);
        editor.commit();

        booleanValues.put(key, value);
    }

    public static Float getFloat(Context context, String key) {
        return getFloat(context, key, null);
    }

    public static Float getFloat(Context context, String key, Float defaultValue) {
        return getFloat(context, key, defaultValue, false);
    }

    public static Float getFloat(Context context, String key, Float defaultValue, boolean forceUpdate) {
        Log.i(tag, "Get " + (forceUpdate ? " Force Update" : "") + key);
        if (floatValues == null)
            floatValues = new HashMap<String, Float>();

        if (!floatValues.containsKey(key) || forceUpdate)
            floatValues.put(key,
                    getCurrentSharedPreferences(context)
                            .getFloat(key, defaultValue));

        return floatValues.get(key);
    }

    public static void setValue(Context context, String key, Float value) {
        Log.i(tag, "Set " + key + ":" + value);

        if (floatValues == null)
            floatValues = new HashMap<String, Float>();

        Editor editor = getCurrentSharedPreferences(context)
                .edit();
        editor.putFloat(key, value);
        editor.commit();

        floatValues.put(key, value);
    }

    public static Long getLong(Context context, String key) {
        return getLong(context, key, null);
    }

    public static Long getLong(Context context, String key, Long defaultValue) {
        return getLong(context, key, defaultValue, false);
    }

    public static Long getLong(Context context, String key, Long defaultValue, boolean forceUpdate) {
        Log.i(tag, "Get " + (forceUpdate ? "Force Update " : "") + key);
        if (longValues == null)
            longValues = new HashMap<String, Long>();

        if (!longValues.containsKey(key) || forceUpdate)
            longValues.put(key,
                    getCurrentSharedPreferences(context)
                            .getLong(key, defaultValue));

        return longValues.get(key);
    }

    public static void setValue(Context context, String key, Long value) {
        Log.i(tag, "Set " + key + ":" + value);

        if (longValues == null)
            longValues = new HashMap<String, Long>();

        Editor editor = getCurrentSharedPreferences(context)
                .edit();
        editor.putLong(key, value);
        editor.commit();

        longValues.put(key, value);
    }

    public static String getString(Context context, String key) {
        return getString(context, key, null);
    }

    public static String getString(Context context, String key,
                                   String defaultValue) {
        return getString(context, key, defaultValue, false);
    }

    public static String getString(Context context, String key,
                                   String defaultValue, boolean forceUpdate) {
        Log.i(tag, "Get " + (forceUpdate ? "Force Update " : "") + key);
        if (stringValues == null)
            stringValues = new HashMap<String, String>();

        if (!stringValues.containsKey(key))
            stringValues.put(key,
                    getCurrentSharedPreferences(context)
                            .getString(key, defaultValue));

        return stringValues.get(key);
    }

    public static void setValue(Context context, String key, String value) {
        Log.i(tag, "Set " + key + ":" + value);

        if (stringValues == null)
            stringValues = new HashMap<String, String>();

        Editor editor = getCurrentSharedPreferences(context)
                .edit();
        editor.putString(key, value);
        editor.commit();

        stringValues.put(key, value);
    }

    public static Integer getInt(Context context, String key) {
        return getInt(context, key, null);
    }

    public static Integer getInt(Context context, String key,
                                 Integer defaultValue) {
        return getInt(context, key, defaultValue, false);
    }

    public static Integer getInt(Context context, String key,
                                 Integer defaultValue, boolean forceUpdate) {
        Log.i(tag, "Get " + (forceUpdate ? "Force Update " : "") + key);
        if (intValues == null)
            intValues = new HashMap<String, Integer>();

        if (!intValues.containsKey(key))
            intValues.put(key,
                    getCurrentSharedPreferences(context)
                            .getInt(key, defaultValue));

        return intValues.get(key);
    }

    public static void setValue(Context context, String key, Integer value) {
        Log.i(tag, "Set " + key + ":" + value);

        if (intValues == null)
            intValues = new HashMap<String, Integer>();

        Editor editor = getCurrentSharedPreferences(context)
                .edit();
        editor.putInt(key, value);
        editor.commit();

        intValues.put(key, value);
    }

    public static void clearValue(Context context, String key) {
        Log.i(tag, "Clear " + key);

        if (intValues == null)
            intValues = new HashMap<String, Integer>();

        if (booleanValues == null)
            booleanValues = new HashMap<String, Boolean>();

        if (floatValues == null)
            floatValues = new HashMap<String, Float>();

        if (stringValues == null)
            stringValues = new HashMap<String, String>();

        if (longValues == null)
            longValues = new HashMap<String, Long>();

        Editor editor = getCurrentSharedPreferences(context)
                .edit();
        editor.remove(key);
        editor.commit();

        intValues.remove(key);
        booleanValues.remove(key);
        floatValues.remove(key);
        stringValues.remove(key);
        longValues.remove(key);
    }

    public enum PreferencesMode {
        PRIVATE(Context.MODE_PRIVATE),
        APPEND(Context.MODE_APPEND),
        ENABLE_WRITE_AHEAD_LOGGING(Context.MODE_ENABLE_WRITE_AHEAD_LOGGING),
        MULTI_PROCESS(Context.MODE_MULTI_PROCESS);

        int value;

        PreferencesMode(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }
    }

}


text:
<?php

define("DISEASE", "Flu");

$locations = array(
	"BR" => "Brazil",
	"CA" => "Canada",
	"JP" => "Japan",
	"MX" => "Mexico",
	"US" => "UnitedStates",
	"NYC" => "NYC"
);

foreach($locations as $cc => $country){

	$filename = "/home/anojima/raw_data/".DISEASE."/".$country."MapDataRaw.js";
	$json = file_get_contents($filename);
	$data = json_decode($json, true);

	$client = new MongoClient("mongodb://mongo-clusterAA1:27017");
	$database = $client->healthtweet;
	$collection = $database->categories;
	$cursor = $collection->find();
	foreach($cursor as $doc){
		$id = $doc["_id"];
		if (array_key_exists($id, $data["features"])){
			$data["features"][$id]["properties"]["evaluated"] = true;
		}
	}

	$json = json_encode($data);
	$file = fopen($filename,"w");
	fwrite($file,$json);
	fclose($file);

	$readMapDataFile = fopen("/home/anojima/public_html/healthtweet/data/".DISEASE."/".$country."MapData.js","w");
	fwrite($readMapDataFile,"var results = \n".$json.";\n");
	fclose($readMapDataFile);

}

?>


text:
<?php
return array(
	'modules' => array(
		'users' => array(
			'class' => 'Application.App_Code.UserManager',
		),
		'auth' => array(
			'class' => 'Application.App_Code.TrackerAuthManager',
			'properties' => array(
				'UserManager' => 'users',
				'LoginPage' => 'TimeTracker.Login'
			),
		),
	),
	'authorization' => array(
		array('action'=>'allow','pages'=>'ProjectList, ProjectDetails, ReportResource, ReportProject','roles'=>'manager'),
		array('action'=>'allow','pages'=>'LogTimeEntry','roles'=>'consultant'),
		array('action'=>'allow','pages'=>'UserCrate,Logout,Login','users'=>'*'),
		array('action'=>'deny','users'=>'*'),
	),
	'pages' => array(
		'properties' => array(
			'MasterClass' => 'Application.pages.TimeTracker.MainLayout',
			'Theme' => 'TimeTracker',
		),
	),
	'parameters' => array(
		'NewUserRoles' => 'admin,manager,consultant',
	),
);


text:
all:
	python ~/Dropbox/grad/research/career/resume/resume-professional/make_resume.py html > index.html


text:
package org.apache.bigtop.bigpetstore;

import static org.apache.bigtop.bigpetstore.ITUtils.BPS_TEST_GENERATED;
import static org.apache.bigtop.bigpetstore.ITUtils.BPS_TEST_PIG_CLEANED;
import static org.apache.bigtop.bigpetstore.ITUtils.fs;

import java.io.File;
import java.util.Map;
import java.util.Map.Entry;

import org.apache.bigtop.bigpetstore.etl.PigCSVCleaner;
import org.apache.bigtop.bigpetstore.util.BigPetStoreConstants;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.pig.ExecType;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.Predicate;
import com.google.common.collect.ImmutableMap;

/**
 * This is the main integration test for pig. Like all BPS integration tests, it
 * is designed to simulate exactly what will happen on the actual cluster,
 * except with a small amount of records.
 *
 * In addition to cleaning the dataset, it also runs the BPS_analytics.pig
 * script which BigPetStore ships with.
 */
public class BigPetStorePigIT {

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

	/**
	 * An extra unsupported code path that we have so people can do ad hoc
	 * analytics on pig data after it is cleaned.
	 */
	public static final Path BPS_TEST_PIG_COUNT_PRODUCTS = fs
			.makeQualified(new Path("bps_integration_",
					BigPetStoreConstants.OUTPUTS.pig_ad_hoc_script.name() + "0"));

	static final File PIG_SCRIPT = new File("BPS_analytics.pig");

	static {
		if (!PIG_SCRIPT.exists()) {
			throw new RuntimeException("Couldnt find pig script at " + PIG_SCRIPT.getAbsolutePath());
		}
	}

	@Before
	public void setupTest() throws Throwable {
		ITUtils.setup();
		try {
			FileSystem.get(new Configuration()).delete(BPS_TEST_PIG_CLEANED, true);
			FileSystem.get(new Configuration()).delete(BPS_TEST_PIG_COUNT_PRODUCTS, true);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}

	static Map<Path, Predicate<String>> TESTS = ImmutableMap.of(
		/** Test of the main output */
		BPS_TEST_PIG_CLEANED, ITUtils.VERIFICATION_PERDICATE,
		// Example of how to count products after doing basic pig data cleanup
		BPS_TEST_PIG_COUNT_PRODUCTS, ITUtils.VERIFICATION_PERDICATE,
		// Test the output that is to be used as an input for Mahout.
		BigPetStoreMahoutIT.INPUT_DIR_PATH, ITUtils.VERIFICATION_PERDICATE
	);

	@Test
	public void testPetStoreCorePipeline() throws Exception {
		runPig(BPS_TEST_GENERATED, BPS_TEST_PIG_CLEANED, PIG_SCRIPT);
		for (Entry<Path, Predicate<String>> e : TESTS.entrySet()) {
			ITUtils.assertOutput(e.getKey(), e.getValue());
		}
	}

	private void runPig(Path input, Path output, File pigscript)
			throws Exception {
		new PigCSVCleaner(input, output, ExecType.LOCAL, pigscript);
	}
}


text:
package ru.stqa.pft.mantis.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "mantis_user_table")
public class UserData {

  @Column(name = "username")
  private String username;

  @Id
  @Column(name = "id")
  private int id;

  public int getId() {
    return id;
  }

  public String getUsername() {
    return username;
  }

  public UserData withId(int id) {
    this.id = id;
    return this;
  }

  public UserData withUsername(String username) {
    this.username = username;
    return this;
  }

  @Override
  public String toString() {
    return "UserData{" +
            "username='" + username + '\'' +
            ", id=" + id + '\'' +
            '}';
  }

}


text:
namespace Cedar.EventStore
{
    public class GesEventStoreTests : EventStoreAcceptanceTests
    {
        protected override EventStoreAcceptanceTestFixture GetFixture()
        {
            return new GesEventStoreFixture();
        }
    }
}


text:
{% include "banners/header.html" %}
{% block content %}

threat_note

Indicators

{{ records['object'] }}

        This page contains information on {{ records['object'] }} that was manually entered, as well as 3rd party supplemental information that can aide an analyst in research. 3rd party sources can include VirusTotal, PassiveTotal, Whois, geolocational data, and more. You can enable these 3rd party integrations in the settings menu.

        On this page, you can also edit the entry to add new fields or change any attributes previously entered. You can also delete the entry if it's no longer needed.

          <form class="form-horizontal" action="/edit/object/" enctype="application/x-www-form-urlencoded" method="POST">
          <fieldset>

              <input type="hidden" name="records" value="{{ records['_id'] }}">
              <button type="submit" class="btn btn-default"> Edit Entry</button>
              Delete Entry

          </fieldset>
          </form>

                  Attribute
                  Value

              {% for key in records %}
                {% if key == "_id" %}

                    {{key}}
                    {{ records[key] }}

                {% else %}
                  {% if records[key]|length == 0 %}

                    {{key}}
                    -

                  {% else %}

                    {{key}}
                    {{ records[key] }}

                {% endif %}
                {% endif %}
              {% endfor %}
              {% if records['inputtype'] == "IPv4" %}

                   {% for setting in settingsvars %}
                    {% if setting['whoisinfo'] == "on" %}

                Whois Data
                {{ whoisdata }}

                  {% endif %}

                    {% if setting['vtinfo'] == "on" %}

                Passive DNS
                {% for record in jsonvt['resolutions'] %}
                    Last Resolved: {{ record['last_resolved'] }} Hostname: {{ record['hostname'] }}

                    {% endfor %}
                    {% endif %}
                    {% endfor %}

              {% elif records['inputtype'] == "Domain" %}

                Whois Data
                {{ whoisdata }}

                Passive DNS
                {% for record in jsonvt['resolutions'] %}
                    Last Resolved: {{ record['last_resolved'] }} IP Address: {{ record['ip_address'] }}

                {% endfor %}
              {% endif %}

{% endblock %}
{% include "banners/footer.html" %}


text:
Exercises tests for the WebAuthn remoteDesktopClientOverride client extension.
The extension has a runtime feature, WebAuthnRemoteDesktopSupport, which is
controlled by the  --webauthn-remote-desktop-support command line switch.

Bug: 1314480


text:
// Copyright 2016-2017 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once

/**
 * @file soc_log.h
 * @brief SOC library logging functions
 *
 * To make SOC library compatible with environments which don't use ESP-IDF,
 * this header file provides wrappers for logging functions.
 */

#ifdef ESP_PLATFORM
#include "esp_log.h"
#define SOC_LOGE(tag, fmt, ...) ESP_EARLY_LOGE(tag, fmt, ##__VA_ARGS__)
#define SOC_LOGW(tag, fmt, ...) ESP_EARLY_LOGW(tag, fmt, ##__VA_ARGS__)
#define SOC_LOGI(tag, fmt, ...) ESP_EARLY_LOGI(tag, fmt, ##__VA_ARGS__)
#define SOC_LOGD(tag, fmt, ...) ESP_EARLY_LOGD(tag, fmt, ##__VA_ARGS__)
#define SOC_LOGV(tag, fmt, ...) ESP_EARLY_LOGV(tag, fmt, ##__VA_ARGS__)

#else
#include "esp32/rom/ets_sys.h"
#define SOC_LOGE(tag, fmt, ...) ets_printf("%s(err): " fmt, tag, ##__VA_ARGS__)
#define SOC_LOGW(tag, fmt, ...) ets_printf("%s(warn): " fmt, tag, ##__VA_ARGS__)
#define SOC_LOGI(tag, fmt, ...) ets_printf("%s(info): " fmt, tag, ##__VA_ARGS__)
#define SOC_LOGD(tag, fmt, ...) ets_printf("%s(dbg): " fmt, tag, ##__VA_ARGS__)
#define SOC_LOGV(tag, fmt, ...) ets_printf("%s: " fmt, tag, ##__VA_ARGS__)
#endif //ESP_PLATFORM


text:
{% extends "layout.html" %}

{% block content %}

Reset Password

<form class="form-signin" role="form" method="post" action="">
  {{ form.csrf_token }}
  {{ form.email(placeholder="email") }}

      {% if form.email.errors %}
        {% for error in form.email.errors %}
          {{ error }}
        {% endfor %}
      {% endif %}

  <button class="btn btn-success" type="submit">Reset Password</button>
</form>

{% endblock %}